| 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() |