liuyizhang
commited on
Commit
•
9dccae8
1
Parent(s):
af76788
update app.py
Browse files
app.py
CHANGED
@@ -682,7 +682,7 @@ def change_radio_display(task_type, mask_source_radio, num_relation): #, gsa_gal
|
|
682 |
# gsa_gallery_visible = False
|
683 |
# ram_gallery_visible = True
|
684 |
return gr.Textbox.update(visible=text_prompt_visible), gr.Textbox.update(visible=inpaint_prompt_visible), gr.Radio.update(visible=mask_source_radio_visible), gr.Slider.update(visible=num_relation_visible)
|
685 |
-
# gr.Gallery.update(visible=
|
686 |
|
687 |
if __name__ == "__main__":
|
688 |
parser = argparse.ArgumentParser("Grounded SAM demo", add_help=True)
|
@@ -731,7 +731,7 @@ if __name__ == "__main__":
|
|
731 |
|
732 |
|
733 |
run_button.click(fn=run_anything_task, inputs=[
|
734 |
-
input_image, text_prompt, task_type, inpaint_prompt, box_threshold, text_threshold, iou_threshold, inpaint_mode, mask_source_radio, remove_mode, remove_mask_extend, num_relation], outputs=[
|
735 |
task_type.change(fn=change_radio_display, inputs=[task_type, mask_source_radio], outputs=[text_prompt, inpaint_prompt, mask_source_radio, num_relation])
|
736 |
mask_source_radio.change(fn=change_radio_display, inputs=[task_type, mask_source_radio], outputs=[text_prompt, inpaint_prompt, mask_source_radio, num_relation])
|
737 |
|
|
|
682 |
# gsa_gallery_visible = False
|
683 |
# ram_gallery_visible = True
|
684 |
return gr.Textbox.update(visible=text_prompt_visible), gr.Textbox.update(visible=inpaint_prompt_visible), gr.Radio.update(visible=mask_source_radio_visible), gr.Slider.update(visible=num_relation_visible)
|
685 |
+
# gr.Gallery.update(visible=gsa_gallery_visible), gr.Gallery.update(visible=ram_gallery_visible)
|
686 |
|
687 |
if __name__ == "__main__":
|
688 |
parser = argparse.ArgumentParser("Grounded SAM demo", add_help=True)
|
|
|
731 |
|
732 |
|
733 |
run_button.click(fn=run_anything_task, inputs=[
|
734 |
+
input_image, text_prompt, task_type, inpaint_prompt, box_threshold, text_threshold, iou_threshold, inpaint_mode, mask_source_radio, remove_mode, remove_mask_extend, num_relation], outputs=[gallery, gallery])
|
735 |
task_type.change(fn=change_radio_display, inputs=[task_type, mask_source_radio], outputs=[text_prompt, inpaint_prompt, mask_source_radio, num_relation])
|
736 |
mask_source_radio.change(fn=change_radio_display, inputs=[task_type, mask_source_radio], outputs=[text_prompt, inpaint_prompt, mask_source_radio, num_relation])
|
737 |
|