yizhangliu
commited on
Commit
•
43419c1
1
Parent(s):
fb7ee5f
Update app.py
Browse files
app.py
CHANGED
@@ -778,7 +778,7 @@ def get_model_device(module):
|
|
778 |
return 'Error'
|
779 |
|
780 |
ram_enable = True
|
781 |
-
kosmos_enable =
|
782 |
|
783 |
task_types = ["detection", "segment", "inpainting", "remove"]
|
784 |
if ram_enable:
|
@@ -795,6 +795,9 @@ if __name__ == "__main__":
|
|
795 |
|
796 |
set_device()
|
797 |
|
|
|
|
|
|
|
798 |
load_groundingdino_model()
|
799 |
if os.environ.get('IS_MY_DEBUG') is None:
|
800 |
get_sam_vit_h_4b8939()
|
@@ -805,9 +808,6 @@ if __name__ == "__main__":
|
|
805 |
if ram_enable:
|
806 |
load_ram_model()
|
807 |
|
808 |
-
if os.environ.get('IS_MY_DEBUG') is None and kosmos_enable:
|
809 |
-
kosmos_model, kosmos_processor = load_kosmos_model(device)
|
810 |
-
|
811 |
if os.environ.get('IS_MY_DEBUG') is None:
|
812 |
os.system("pip list")
|
813 |
|
|
|
778 |
return 'Error'
|
779 |
|
780 |
ram_enable = True
|
781 |
+
kosmos_enable = True
|
782 |
|
783 |
task_types = ["detection", "segment", "inpainting", "remove"]
|
784 |
if ram_enable:
|
|
|
795 |
|
796 |
set_device()
|
797 |
|
798 |
+
if os.environ.get('IS_MY_DEBUG') is None and kosmos_enable:
|
799 |
+
kosmos_model, kosmos_processor = load_kosmos_model(device)
|
800 |
+
|
801 |
load_groundingdino_model()
|
802 |
if os.environ.get('IS_MY_DEBUG') is None:
|
803 |
get_sam_vit_h_4b8939()
|
|
|
808 |
if ram_enable:
|
809 |
load_ram_model()
|
810 |
|
|
|
|
|
|
|
811 |
if os.environ.get('IS_MY_DEBUG') is None:
|
812 |
os.system("pip list")
|
813 |
|