fffiloni commited on
Commit
e6603c1
·
verified ·
1 Parent(s): 5e4c885

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +11 -5
app.py CHANGED
@@ -159,15 +159,21 @@ with gr.Blocks() as demo:
159
  with gr.Column():
160
  gr.Markdown("# SAM2 Image Predictor")
161
  with gr.Row():
162
- input_image = gr.Image(label="input image", interactive=True, type="filepath")
163
  with gr.Column():
 
164
  with gr.Row():
165
  point_type = gr.Radio(label="point type", choices=["include", "exclude"], value="include")
166
  clear_points_btn = gr.Button("Clear Points")
167
- points_map = gr.Image(label="points map", interactive=False)
168
- submit_btn = gr.Button("Submit")
169
- output_result = gr.Image()
170
- output_result_mask = gr.Image()
 
 
 
 
 
 
171
 
172
  clear_points_btn.click(
173
  fn = preprocess_image,
 
159
  with gr.Column():
160
  gr.Markdown("# SAM2 Image Predictor")
161
  with gr.Row():
 
162
  with gr.Column():
163
+ input_image = gr.Image(label="input image", interactive=True, type="filepath")
164
  with gr.Row():
165
  point_type = gr.Radio(label="point type", choices=["include", "exclude"], value="include")
166
  clear_points_btn = gr.Button("Clear Points")
167
+ with gr.Column():
168
+ points_map = gr.Image(
169
+ label="points map",
170
+ interactive=False,
171
+ height=400
172
+ )
173
+ submit_btn = gr.Button("Submit")
174
+ with gr.Column():
175
+ output_result = gr.Image()
176
+ output_result_mask = gr.Image()
177
 
178
  clear_points_btn.click(
179
  fn = preprocess_image,