Spaces:
Build error
Build error
Update app.py
Browse files
app.py
CHANGED
|
@@ -29,14 +29,14 @@ def predict(image):
|
|
| 29 |
mobilenet_label = np.argmax(mobilenet_pred)
|
| 30 |
custom_cnn_label = np.argmax(custom_cnn_pred)
|
| 31 |
|
| 32 |
-
return
|
| 33 |
-
"VGG16 Prediction": vgg_label,
|
| 34 |
-
"MobileNet Prediction": mobilenet_label,
|
| 35 |
-
"Custom CNN Prediction": custom_cnn_label
|
| 36 |
-
}
|
| 37 |
|
| 38 |
# Create the Gradio interface
|
| 39 |
inputs = gr.components.Image()
|
| 40 |
-
outputs
|
|
|
|
|
|
|
|
|
|
|
|
|
| 41 |
|
| 42 |
-
gr.Interface(fn=predict, inputs=inputs, outputs=outputs).launch()
|
|
|
|
| 29 |
mobilenet_label = np.argmax(mobilenet_pred)
|
| 30 |
custom_cnn_label = np.argmax(custom_cnn_pred)
|
| 31 |
|
| 32 |
+
return custom_cnn_label, vgg_label, mobilenet_label
|
|
|
|
|
|
|
|
|
|
|
|
|
| 33 |
|
| 34 |
# Create the Gradio interface
|
| 35 |
inputs = gr.components.Image()
|
| 36 |
+
outputs=[
|
| 37 |
+
gr.components.Textbox(label="Custom CNN Model Label"),
|
| 38 |
+
gr.components.Textbox(label="VGG16 Model Label"),
|
| 39 |
+
gr.components.Textbox(label="MobileNet Label")
|
| 40 |
+
]
|
| 41 |
|
| 42 |
+
gr.Interface(fn=predict, inputs=inputs, outputs=outputs, title="Fish Classification", theme="dark").launch()
|