LPX55 commited on
Commit
3a8ed1d
·
verified ·
1 Parent(s): 014dfe3

Update sam2_mask.py

Browse files
Files changed (1) hide show
  1. sam2_mask.py +5 -1
sam2_mask.py CHANGED
@@ -153,7 +153,8 @@ def create_sam2_tab():
153
  with gr.Column():
154
  with gr.Row():
155
  with gr.Column():
156
- sam_input_image = gr.Image(label="input image", interactive=False, type="filepath", visible=False)
 
157
  points_map = gr.Image(
158
  label="points map",
159
  type="filepath",
@@ -167,7 +168,10 @@ def create_sam2_tab():
167
  with gr.Column():
168
  output_image = gr.Image("Segmented Output")
169
  output_result_mask = gr.Image()
 
 
170
 
 
171
  # Event handlers
172
  points_map.upload(
173
  fn = preprocess_image,
 
153
  with gr.Column():
154
  with gr.Row():
155
  with gr.Column():
156
+ sam_input_image = gr.Image(label="input image", interactive=False, type="filepath", visible=False)
157
+ img_prompter = ImagePrompter(show_label=False)
158
  points_map = gr.Image(
159
  label="points map",
160
  type="filepath",
 
168
  with gr.Column():
169
  output_image = gr.Image("Segmented Output")
170
  output_result_mask = gr.Image()
171
+ prompted_output = gr.Image(show_label=False)
172
+ prompted_data = gr.Dataframe(label="Points")
173
 
174
+ # lambda prompts: (prompts["image"], prompts["points"]),
175
  # Event handlers
176
  points_map.upload(
177
  fn = preprocess_image,