AbdullahAj2000 commited on
Commit
ec6171b
·
verified ·
1 Parent(s): 953c01a

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -5
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
- outputs_image = [
54
- gr.Image(type="numpy", label="Output Image"),
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