add online demo
Browse files
app.py
CHANGED
@@ -34,11 +34,11 @@ if __name__ == '__main__':
|
|
34 |
# # Change back to the previous directory
|
35 |
# os.system("cd ..")
|
36 |
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
os.system("curl -o ./checkpoints/sam_vit_b_01ec64.pth https://dl.fbaipublicfiles.com/segment_anything/sam_vit_b_01ec64.pth")
|
42 |
|
43 |
import argparse
|
44 |
from demo.UI import Main_ui
|
|
|
34 |
# # Change back to the previous directory
|
35 |
# os.system("cd ..")
|
36 |
|
37 |
+
import subprocess
|
38 |
+
import sys
|
39 |
+
subprocess.check_call([sys.executable, 'pip', 'install', 'git+https://github.com/facebookresearch/segment-anything.git'])
|
40 |
+
subprocess.check_call([sys.executable, 'curl', '-o', './checkpoints/sam_vit_b_01ec64.pth', 'https://dl.fbaipublicfiles.com/segment_anything/sam_vit_b_01ec64.pth'])
|
41 |
+
# os.system("curl -o ./checkpoints/sam_vit_b_01ec64.pth https://dl.fbaipublicfiles.com/segment_anything/sam_vit_b_01ec64.pth")
|
42 |
|
43 |
import argparse
|
44 |
from demo.UI import Main_ui
|