Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -163,15 +163,14 @@ with gr.Blocks() as demo:
|
|
163 |
gr.Markdown("# Demo to run Segment Anything base model")
|
164 |
gr.Markdown("""This app uses the [Segment Anything](https://huggingface.co/facebook/sam-vit-base) model from Meta to get a mask from a points in an image.
|
165 |
""")
|
166 |
-
with gr.
|
167 |
-
|
168 |
-
|
169 |
-
|
170 |
-
|
171 |
-
|
172 |
-
|
173 |
-
|
174 |
-
image_button.click(inference_scribble, inputs=image_input, outputs=image_output)
|
175 |
image_input.upload(reset_data)
|
176 |
|
177 |
demo.launch()
|
|
|
163 |
gr.Markdown("# Demo to run Segment Anything base model")
|
164 |
gr.Markdown("""This app uses the [Segment Anything](https://huggingface.co/facebook/sam-vit-base) model from Meta to get a mask from a points in an image.
|
165 |
""")
|
166 |
+
with gr.Row():
|
167 |
+
image_input = gr.Image(label="[Stroke] Draw on Image", tool='sketch',type='pil')
|
168 |
+
image_output1 = gr.Image(type="pil", label="Mask with Image")
|
169 |
+
image_output2 = gr.Image(type="pil", label="Mask")
|
170 |
+
|
171 |
+
image_button = gr.Button("Genarate-Segment-Mask")
|
172 |
+
|
173 |
+
image_button.click(inference_scribble, inputs=image_input, outputs=image_output1)
|
|
|
174 |
image_input.upload(reset_data)
|
175 |
|
176 |
demo.launch()
|