Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -32,10 +32,13 @@ def predict_image(image):
|
|
| 32 |
return {"prediction": predict_label, "confidence": float(np.max(predictions))}
|
| 33 |
|
| 34 |
# Create the interface
|
| 35 |
-
input_interface = gr.Image(
|
| 36 |
-
output_interface =
|
| 37 |
|
| 38 |
-
iface = gr.Interface(
|
|
|
|
|
|
|
|
|
|
| 39 |
|
| 40 |
# Launch the interface
|
| 41 |
-
iface.launch()
|
|
|
|
| 32 |
return {"prediction": predict_label, "confidence": float(np.max(predictions))}
|
| 33 |
|
| 34 |
# Create the interface
|
| 35 |
+
input_interface = gr.Image(type ='pil')
|
| 36 |
+
output_interface = "json"
|
| 37 |
|
| 38 |
+
iface = gr.Interface(
|
| 39 |
+
fn=predict_image,
|
| 40 |
+
inputs=input_interface,
|
| 41 |
+
outputs=output_interface)
|
| 42 |
|
| 43 |
# Launch the interface
|
| 44 |
+
iface.launch(share=True)
|