Update app.py
Browse files
app.py
CHANGED
@@ -24,4 +24,8 @@ def predict(img):
|
|
24 |
pred,pred_idx,probs = learn.predict(img)
|
25 |
return {labels[i]: float(probs[i]) for i in range(len(labels))}
|
26 |
|
27 |
-
gr.Interface(fn=predict, inputs=gr.Image(), outputs=gr.Label(num_top_classes=2)).launch(share=True)
|
|
|
|
|
|
|
|
|
|
24 |
pred,pred_idx,probs = learn.predict(img)
|
25 |
return {labels[i]: float(probs[i]) for i in range(len(labels))}
|
26 |
|
27 |
+
demo=gr.Interface(fn=predict, inputs=gr.Image(), outputs=gr.Label(num_top_classes=2)).launch(share=True)
|
28 |
+
|
29 |
+
|
30 |
+
if __name__ == "__main__":
|
31 |
+
demo.launch()
|