Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -33,9 +33,12 @@ description_e = """This is a demo of [Faster Segment Anything(MobileSAM) Model](
|
|
33 |
|
34 |
"""
|
35 |
|
36 |
-
description_p = """ # Instructions for
|
37 |
-
|
38 |
-
|
|
|
|
|
|
|
39 |
|
40 |
"""
|
41 |
|
@@ -247,7 +250,7 @@ with gr.Blocks(css=css, title="Faster Segment Anything(MobileSAM)") as demo:
|
|
247 |
# # Description
|
248 |
# gr.Markdown(description_e)
|
249 |
#
|
250 |
-
with gr.Tab("
|
251 |
# Images
|
252 |
with gr.Row(variant="panel"):
|
253 |
with gr.Column(scale=1):
|
@@ -263,14 +266,13 @@ with gr.Blocks(css=css, title="Faster Segment Anything(MobileSAM)") as demo:
|
|
263 |
add_or_remove = gr.Radio(
|
264 |
["Add Mask", "Remove Area"],
|
265 |
value="Add Mask",
|
266 |
-
label="Point_label (foreground/background)",
|
267 |
)
|
268 |
|
269 |
with gr.Column():
|
270 |
segment_btn_p = gr.Button(
|
271 |
-
"
|
272 |
)
|
273 |
-
clear_btn_p = gr.Button("
|
274 |
|
275 |
gr.Markdown("Try some of the examples below ⬇️")
|
276 |
gr.Examples(
|
|
|
33 |
|
34 |
"""
|
35 |
|
36 |
+
description_p = """ # Instructions for point mode
|
37 |
+
|
38 |
+
0. Restart by click the Restart button
|
39 |
+
1. Select a point with Add Mask for the foreground (Must)
|
40 |
+
2. Select a point with Remove Area for the background (Optional)
|
41 |
+
3. Click the Start Segmenting.
|
42 |
|
43 |
"""
|
44 |
|
|
|
250 |
# # Description
|
251 |
# gr.Markdown(description_e)
|
252 |
#
|
253 |
+
with gr.Tab("Point mode"):
|
254 |
# Images
|
255 |
with gr.Row(variant="panel"):
|
256 |
with gr.Column(scale=1):
|
|
|
266 |
add_or_remove = gr.Radio(
|
267 |
["Add Mask", "Remove Area"],
|
268 |
value="Add Mask",
|
|
|
269 |
)
|
270 |
|
271 |
with gr.Column():
|
272 |
segment_btn_p = gr.Button(
|
273 |
+
"Start segmenting!", variant="primary"
|
274 |
)
|
275 |
+
clear_btn_p = gr.Button("Restart", variant="secondary")
|
276 |
|
277 |
gr.Markdown("Try some of the examples below ⬇️")
|
278 |
gr.Examples(
|