Spaces:
Build error
Build error
Update app.py
Browse files
app.py
CHANGED
|
@@ -31,7 +31,7 @@ def predict(image):
|
|
| 31 |
predicted_class_idx = logits.argmax(-1).item()
|
| 32 |
return(model.config.id2label[predicted_class_idx])
|
| 33 |
|
| 34 |
-
demo = gr.Interface(fn=predict, inputs="image", outputs=
|
| 35 |
description=description,).launch()
|
| 36 |
|
| 37 |
# demo.launch(debug=True)
|
|
|
|
| 31 |
predicted_class_idx = logits.argmax(-1).item()
|
| 32 |
return(model.config.id2label[predicted_class_idx])
|
| 33 |
|
| 34 |
+
demo = gr.Interface(fn=predict, inputs="image", outputs=gr.Label(num_top_classes=2), title=title, examples=["examples/image_1.png", "examples/image_2.png", "examples/image_3.png"],
|
| 35 |
description=description,).launch()
|
| 36 |
|
| 37 |
# demo.launch(debug=True)
|