File size: 397 Bytes
f379bcf
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
import gradio as gr
from huggingface_hub import from_pretrained

# Load the model (try with a built-in model first)
model = from_pretrained("bert-base-uncased")  # Or any other built-in HF model

def predict_simple(text):
    return {"result": text.upper()}

iface = gr.Interface(
    fn=predict_simple,
    inputs="text",
    outputs="text",
    title="Simple Text Uppercasing",
)

iface.launch()