Spaces:
Runtime error
Runtime error
jens
commited on
Commit
·
7299967
1
Parent(s):
d4233b7
updated state
Browse files
app.py
CHANGED
@@ -76,8 +76,8 @@ with block:
|
|
76 |
print("inferencing")
|
77 |
image = inputs[raw_image]
|
78 |
generated_mask, _, _ = sam.cond_pred(pts=np.array(inputs[point_coords]), lbls=np.array(inputs[point_labels]))
|
79 |
-
|
80 |
-
return {masks_annotated_image: (image,
|
81 |
masks: generated_mask,
|
82 |
cutout_idx: set()}
|
83 |
sam_decode_btn.click(on_click_sam_dencode_btn, components, [masks_annotated_image, masks, cutout_idx], queue=True)
|
|
|
76 |
print("inferencing")
|
77 |
image = inputs[raw_image]
|
78 |
generated_mask, _, _ = sam.cond_pred(pts=np.array(inputs[point_coords]), lbls=np.array(inputs[point_labels]))
|
79 |
+
inputs[masks].append((generated_mask, inputs[text]))
|
80 |
+
return {masks_annotated_image: (image, inputs[masks]),
|
81 |
masks: generated_mask,
|
82 |
cutout_idx: set()}
|
83 |
sam_decode_btn.click(on_click_sam_dencode_btn, components, [masks_annotated_image, masks, cutout_idx], queue=True)
|