Spaces:
Runtime error
Runtime error
fix bug
Browse files
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,
|
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(
|