Spaces:
Build error
Build error
Trang Dang
commited on
Commit
•
e643fff
1
Parent(s):
eee3513
add
Browse files
app.py
CHANGED
@@ -22,6 +22,8 @@ app_ui = ui.page_fillable(
|
|
22 |
),
|
23 |
ui.output_image("image"),
|
24 |
ui.output_image("image_output"),
|
|
|
|
|
25 |
),
|
26 |
)
|
27 |
|
@@ -67,6 +69,7 @@ def server(input: Inputs, output: Outputs, session: Session):
|
|
67 |
# convert soft mask to hard mask
|
68 |
single_patch_prob = single_patch_prob.cpu().numpy().squeeze()
|
69 |
single_patch_prediction = (single_patch_prob > 0.5).astype(np.uint8)
|
|
|
70 |
return img
|
71 |
return None
|
72 |
|
|
|
22 |
),
|
23 |
ui.output_image("image"),
|
24 |
ui.output_image("image_output"),
|
25 |
+
ui.output_image("single_patch_prediction"),
|
26 |
+
ui.output_image("single_patch_prob")
|
27 |
),
|
28 |
)
|
29 |
|
|
|
69 |
# convert soft mask to hard mask
|
70 |
single_patch_prob = single_patch_prob.cpu().numpy().squeeze()
|
71 |
single_patch_prediction = (single_patch_prob > 0.5).astype(np.uint8)
|
72 |
+
|
73 |
return img
|
74 |
return None
|
75 |
|