Spaces:
Runtime error
Runtime error
Commit
•
31a0425
1
Parent(s):
332ef02
Update app.py
Browse files
app.py
CHANGED
@@ -18,11 +18,11 @@ def predict(img):
|
|
18 |
pred,pred_idx,probs = learn.predict(img)
|
19 |
return {labels[i]: float(probs[i]) for i in range(len(labels))}
|
20 |
|
21 |
-
title = "
|
22 |
-
description = "A
|
23 |
article="<p style='text-align: center'><a href='https://tmabraham.github.io/blog/gradio_hf_spaces_tutorial' target='_blank'>Blog post</a></p>"
|
24 |
examples = ['Solar_Panel.jpg']
|
25 |
interpretation='default'
|
26 |
enable_queue=True
|
27 |
|
28 |
-
gr.Interface(fn=predict,inputs=gr.inputs.Image(shape=(512, 512)),outputs=gr.outputs.Label(num_top_classes=
|
|
|
18 |
pred,pred_idx,probs = learn.predict(img)
|
19 |
return {labels[i]: float(probs[i]) for i in range(len(labels))}
|
20 |
|
21 |
+
title = "Foof_type_classifier"
|
22 |
+
description = "A food classifier trained on the food images dataset with fastai. Created as a demo for Gradio and HuggingFace Spaces."
|
23 |
article="<p style='text-align: center'><a href='https://tmabraham.github.io/blog/gradio_hf_spaces_tutorial' target='_blank'>Blog post</a></p>"
|
24 |
examples = ['Solar_Panel.jpg']
|
25 |
interpretation='default'
|
26 |
enable_queue=True
|
27 |
|
28 |
+
gr.Interface(fn=predict,inputs=gr.inputs.Image(shape=(512, 512)),outputs=gr.outputs.Label(num_top_classes=2),title=title,description=description,article=article,examples=examples,interpretation=interpretation,enable_queue=enable_queue).launch()
|