Spaces:
Build error
Build error
Update app.py
Browse files
app.py
CHANGED
|
@@ -45,18 +45,19 @@ def show_preds_image(image_path,model_selection):
|
|
| 45 |
font_scale = 2
|
| 46 |
cv2.putText(img, mux_value, (text_x, text_y), cv2.FONT_HERSHEY_SIMPLEX, font_scale, (255, 0, 0), 2, cv2.LINE_AA)
|
| 47 |
|
| 48 |
-
return img
|
| 49 |
|
| 50 |
|
| 51 |
inputs_image = gr.Image(type="filepath", label="Input Image")
|
| 52 |
model_selection = gr.Dropdown(["VGG19","ResNet50","Efficientnet"])
|
| 53 |
-
|
| 54 |
-
|
| 55 |
-
|
|
|
|
| 56 |
interface_image = gr.Interface(
|
| 57 |
fn=show_preds_image,
|
| 58 |
inputs=[inputs_image,model_selection],
|
| 59 |
-
outputs=outputs_image,
|
| 60 |
title="image classification",
|
| 61 |
)
|
| 62 |
|
|
|
|
| 45 |
font_scale = 2
|
| 46 |
cv2.putText(img, mux_value, (text_x, text_y), cv2.FONT_HERSHEY_SIMPLEX, font_scale, (255, 0, 0), 2, cv2.LINE_AA)
|
| 47 |
|
| 48 |
+
return img,str(classify_image(image_path,model_selection))
|
| 49 |
|
| 50 |
|
| 51 |
inputs_image = gr.Image(type="filepath", label="Input Image")
|
| 52 |
model_selection = gr.Dropdown(["VGG19","ResNet50","Efficientnet"])
|
| 53 |
+
|
| 54 |
+
outputs_image = gr.Image(type="numpy", label="Output Image")
|
| 55 |
+
output_text = gr.Textbox()
|
| 56 |
+
|
| 57 |
interface_image = gr.Interface(
|
| 58 |
fn=show_preds_image,
|
| 59 |
inputs=[inputs_image,model_selection],
|
| 60 |
+
outputs=[outputs_image,output_text],
|
| 61 |
title="image classification",
|
| 62 |
)
|
| 63 |
|