napatswift commited on
Commit
e1ed59b
1 Parent(s): 280932d

Update app

Browse files
Files changed (1) hide show
  1. main.py +1 -2
main.py CHANGED
@@ -92,7 +92,6 @@ def predict(image_input):
92
 
93
  # For each mask, get the bounding box.
94
  for mask in mask_images:
95
- return mask.astype(np.uint8)
96
  bbox_list.extend(get_bbox(mask.astype(np.uint8)))
97
 
98
  # Return the bounding boxes.
@@ -103,7 +102,7 @@ def run():
103
  demo = gr.Interface(
104
  fn=predict,
105
  inputs=gr.components.Image(),
106
- outputs=gr.components.Image(),
107
  )
108
 
109
  demo.launch(server_name="0.0.0.0", server_port=7860)
 
92
 
93
  # For each mask, get the bounding box.
94
  for mask in mask_images:
 
95
  bbox_list.extend(get_bbox(mask.astype(np.uint8)))
96
 
97
  # Return the bounding boxes.
 
102
  demo = gr.Interface(
103
  fn=predict,
104
  inputs=gr.components.Image(),
105
+ outputs=gr.JSON(),
106
  )
107
 
108
  demo.launch(server_name="0.0.0.0", server_port=7860)