Update app.py
Browse files
app.py
CHANGED
|
@@ -15,6 +15,13 @@ def predict(img):
|
|
| 15 |
return {labels[i]: float(probs[i]) for i in range(len(labels))}
|
| 16 |
|
| 17 |
# Creamos la interfaz y la lanzamos.
|
| 18 |
-
gr.Interface(
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 19 |
|
| 20 |
|
|
|
|
| 15 |
return {labels[i]: float(probs[i]) for i in range(len(labels))}
|
| 16 |
|
| 17 |
# Creamos la interfaz y la lanzamos.
|
| 18 |
+
gr.Interface(
|
| 19 |
+
fn=predict,
|
| 20 |
+
inputs=gr.Image(type="pil"),
|
| 21 |
+
outputs=gr.Label(num_top_classes=3),
|
| 22 |
+
examples=None # Disable for now
|
| 23 |
+
).launch(share=False)
|
| 24 |
+
|
| 25 |
+
#examples=['20098.jpg','20195.jpg']
|
| 26 |
|
| 27 |
|