Spaces:
Runtime error
Runtime error
Commit
·
8e75a4e
1
Parent(s):
50869a2
Update app.py
Browse files
app.py
CHANGED
@@ -1,7 +1,6 @@
|
|
1 |
# -*- coding: utf-8 -*-
|
2 |
"""
|
3 |
Created on Fri Oct 6 17:53:27 2023
|
4 |
-
|
5 |
@author: prarthana.ts
|
6 |
"""
|
7 |
|
@@ -179,20 +178,11 @@ with gr.Blocks(css=css, title='Fast Segment Anything') as demo:
|
|
179 |
segment_btn_t = gr.Button("Segment with text", variant='primary')
|
180 |
clear_btn_t = gr.Button("Clear", variant="secondary")
|
181 |
|
182 |
-
gr.Markdown("
|
183 |
-
gr.Examples(examples=[["examples/dogs.jpg"], ["examples/
|
184 |
inputs=[cond_img_t],
|
185 |
-
examples_per_page=
|
186 |
|
187 |
-
with gr.Column():
|
188 |
-
with gr.Accordion("Advanced options", open=False):
|
189 |
-
iou_threshold = gr.Slider(0.1, 0.9, 0.7, step=0.1, label='iou', info='iou threshold for filtering the annotations')
|
190 |
-
conf_threshold = gr.Slider(0.1, 0.9, 0.25, step=0.05, label='conf', info='object confidence threshold')
|
191 |
-
with gr.Row():
|
192 |
-
mor_check = gr.Checkbox(value=False, label='better_visual_quality', info='better quality using morphologyEx')
|
193 |
-
retina_check = gr.Checkbox(value=True, label='use_retina', info='draw high-resolution segmentation masks')
|
194 |
-
wider_check = gr.Checkbox(value=False, label='wider', info='wider result')
|
195 |
-
|
196 |
segment_btn_t.click(segment_everything,
|
197 |
inputs=[
|
198 |
cond_img_t,
|
|
|
1 |
# -*- coding: utf-8 -*-
|
2 |
"""
|
3 |
Created on Fri Oct 6 17:53:27 2023
|
|
|
4 |
@author: prarthana.ts
|
5 |
"""
|
6 |
|
|
|
178 |
segment_btn_t = gr.Button("Segment with text", variant='primary')
|
179 |
clear_btn_t = gr.Button("Clear", variant="secondary")
|
180 |
|
181 |
+
gr.Markdown("Click on the examples below")
|
182 |
+
gr.Examples(examples=[["examples/dogs.jpg"], ["examples/boat.jpg"], ["examples/russia.jpg"], ["examples/subway.jpg"]],
|
183 |
inputs=[cond_img_t],
|
184 |
+
examples_per_page=4)
|
185 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
186 |
segment_btn_t.click(segment_everything,
|
187 |
inputs=[
|
188 |
cond_img_t,
|