Spaces:
Build error
Build error
Asis commited on
Commit ·
cd4cbfc
1
Parent(s): 8fd12e4
Create app
Browse files1234567import gradio as grdef greet(name):return "Hello " + name + "!!"iface = gr.Interface(fn=greet, inputs="text", outputs="text")iface.launch()123456789101112131415from fastai.vision.all import *import gradio as grlearn = load_learner('model.pkl')labels = learn.dls.vocabdef predict(img):img = PILImage.create(img)pred,pred_idx,probs = learn.predict(img)return {labels[i]: float(probs[i]) for i in range(len(labels))}title = "Empty PLate Classifier"description = "We are passionate about the emptiness of plates, but it is often rather challenging to determine whether a plate is empty or not. This model will help you in that task!"gr.Interface(fn=predict, inputs=gr.inputs.Image(shape=(512, 512)), outputs=gr.outputs.Label(num_top_classes=3)).launch(share=True)
app.py+12-4