kenton-li commited on
Commit
734274e
·
1 Parent(s): 474f8dc

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -2
app.py CHANGED
@@ -112,8 +112,10 @@ def yolov8_inference(
112
  #render = render.resize((dest_width,dest_height))
113
  #renders.append(render)
114
  #colorarray.append(colors)
115
-
116
- return model.predict(image)[0].plot()," "
 
 
117
 
118
  inputs = [
119
  gr.Image(type="filepath", label="Input Image"),
 
112
  #render = render.resize((dest_width,dest_height))
113
  #renders.append(render)
114
  #colorarray.append(colors)
115
+ renders.append(image_results)
116
+ num_masks = image_results.masks.data.shape[0]
117
+
118
+ return renders[0].plot(), "Total num: "+str(num_masks)
119
 
120
  inputs = [
121
  gr.Image(type="filepath", label="Input Image"),