File size: 283 Bytes
16fa697 6ad80d9 16fa697 6ad80d9 16fa697 | 1 2 3 4 5 6 7 8 9 10 11 12 | 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() |