kxqt commited on
Commit
c46b2fc
1 Parent(s): d9f473c
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -23,6 +23,7 @@ hourglass_args = {
23
  }
24
 
25
  def predict(image, speed_mode, points_per_side):
 
26
  mask_generator = SamAutomaticMaskGenerator(
27
  build_sam(checkpoint="sam_vit_h_4b8939.pth", hourglass_kwargs=hourglass_args[speed_mode]),
28
  points_per_side=points_per_side,
@@ -86,7 +87,7 @@ def main():
86
 
87
  run_btn.click(
88
  fn=predict,
89
- inputs=[input_image, speed_mode, int(points_per_side)],
90
  outputs=output_image
91
  )
92
  clear_btn.click(
 
23
  }
24
 
25
  def predict(image, speed_mode, points_per_side):
26
+ points_per_side = int(points_per_side)
27
  mask_generator = SamAutomaticMaskGenerator(
28
  build_sam(checkpoint="sam_vit_h_4b8939.pth", hourglass_kwargs=hourglass_args[speed_mode]),
29
  points_per_side=points_per_side,
 
87
 
88
  run_btn.click(
89
  fn=predict,
90
+ inputs=[input_image, speed_mode, points_per_side],
91
  outputs=output_image
92
  )
93
  clear_btn.click(