Spaces:
Runtime error
Runtime error
Initial Commit
Browse files
app.py
CHANGED
|
@@ -49,15 +49,17 @@ with my_app:
|
|
| 49 |
gr.Markdown("Segment Anything Testing")
|
| 50 |
with gr.Tabs():
|
| 51 |
with gr.TabItem("Select your image"):
|
| 52 |
-
with gr.
|
| 53 |
-
with gr.
|
| 54 |
img_source = gr.Image(label="Please select picture and click the part to segment",
|
| 55 |
value='./images/truck.jpg', shape=(1024, 1024))
|
|
|
|
| 56 |
coords = gr.Label(label="Image Coordinate")
|
| 57 |
model_choice = gr.Dropdown(['ViT-base', 'ViT-large', 'ViT-huge'], label='Model Backbone')
|
|
|
|
| 58 |
infer = gr.Button(label="Segment")
|
| 59 |
-
with gr.Column():
|
| 60 |
score = gr.Label(label="Mask Confidence")
|
|
|
|
| 61 |
img_output = gr.Image(label="Output Mask", shape=(1024, 1024))
|
| 62 |
|
| 63 |
img_source.select(get_coords, [], coords)
|
|
|
|
| 49 |
gr.Markdown("Segment Anything Testing")
|
| 50 |
with gr.Tabs():
|
| 51 |
with gr.TabItem("Select your image"):
|
| 52 |
+
with gr.Column():
|
| 53 |
+
with gr.Row():
|
| 54 |
img_source = gr.Image(label="Please select picture and click the part to segment",
|
| 55 |
value='./images/truck.jpg', shape=(1024, 1024))
|
| 56 |
+
with gr.Row():
|
| 57 |
coords = gr.Label(label="Image Coordinate")
|
| 58 |
model_choice = gr.Dropdown(['ViT-base', 'ViT-large', 'ViT-huge'], label='Model Backbone')
|
| 59 |
+
with gr.Row():
|
| 60 |
infer = gr.Button(label="Segment")
|
|
|
|
| 61 |
score = gr.Label(label="Mask Confidence")
|
| 62 |
+
with gr.Row():
|
| 63 |
img_output = gr.Image(label="Output Mask", shape=(1024, 1024))
|
| 64 |
|
| 65 |
img_source.select(get_coords, [], coords)
|