rmaitest commited on
Commit
f379bcf
·
verified ·
1 Parent(s): 859a209

Create app_simple.py

Browse files
Files changed (1) hide show
  1. app_simple.py +17 -0
app_simple.py ADDED
@@ -0,0 +1,17 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import gradio as gr
2
+ from huggingface_hub import from_pretrained
3
+
4
+ # Load the model (try with a built-in model first)
5
+ model = from_pretrained("bert-base-uncased") # Or any other built-in HF model
6
+
7
+ def predict_simple(text):
8
+ return {"result": text.upper()}
9
+
10
+ iface = gr.Interface(
11
+ fn=predict_simple,
12
+ inputs="text",
13
+ outputs="text",
14
+ title="Simple Text Uppercasing",
15
+ )
16
+
17
+ iface.launch()