mldemo / app_simple.py
rmaitest's picture
Create app_simple.py
f379bcf verified
raw
history blame contribute delete
397 Bytes
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()