Spaces:
Runtime error
Runtime error
liuyizhang
commited on
Commit
·
f0d812d
1
Parent(s):
5836895
update app.py
Browse files
app.py
CHANGED
|
@@ -674,6 +674,15 @@ def change_radio_display(task_type, mask_source_radio):
|
|
| 674 |
num_relation_visible = True
|
| 675 |
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)
|
| 676 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 677 |
if __name__ == "__main__":
|
| 678 |
parser = argparse.ArgumentParser("Grounded SAM demo", add_help=True)
|
| 679 |
parser.add_argument("--debug", action="store_true", help="using debug mode")
|
|
@@ -682,15 +691,6 @@ if __name__ == "__main__":
|
|
| 682 |
|
| 683 |
print(f'args = {args}')
|
| 684 |
|
| 685 |
-
os.system("pip list")
|
| 686 |
-
|
| 687 |
-
set_device()
|
| 688 |
-
load_groundingdino_model()
|
| 689 |
-
load_sam_model()
|
| 690 |
-
load_sd_model()
|
| 691 |
-
load_lama_cleaner_model()
|
| 692 |
-
load_ram_model()
|
| 693 |
-
|
| 694 |
block = gr.Blocks().queue()
|
| 695 |
with block:
|
| 696 |
with gr.Row():
|
|
|
|
| 674 |
num_relation_visible = True
|
| 675 |
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)
|
| 676 |
|
| 677 |
+
set_device()
|
| 678 |
+
load_groundingdino_model()
|
| 679 |
+
load_sam_model()
|
| 680 |
+
load_sd_model()
|
| 681 |
+
load_lama_cleaner_model()
|
| 682 |
+
load_ram_model()
|
| 683 |
+
|
| 684 |
+
os.system("pip list")
|
| 685 |
+
|
| 686 |
if __name__ == "__main__":
|
| 687 |
parser = argparse.ArgumentParser("Grounded SAM demo", add_help=True)
|
| 688 |
parser.add_argument("--debug", action="store_true", help="using debug mode")
|
|
|
|
| 691 |
|
| 692 |
print(f'args = {args}')
|
| 693 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 694 |
block = gr.Blocks().queue()
|
| 695 |
with block:
|
| 696 |
with gr.Row():
|