minimal / app.py
hdchild's picture
bear classification
6ad80d9
raw
history blame contribute delete
283 Bytes
import gradio as gr
from huggingface_hub import from_pretrained_fastai
learner = from_pretrained_fastai("hdchild/bear")
def predict(image):
return learner.predict(image)[0]
iface = gr.Interface(fn=predict, inputs="image", outputs="text", capture_session=True)
iface.launch()