Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -2,16 +2,23 @@ import os
|
|
2 |
import sys
|
3 |
from huggingface_hub import hf_hub_download
|
4 |
|
5 |
-
|
6 |
-
os.system("
|
7 |
-
os.system("
|
8 |
-
|
9 |
-
#
|
10 |
-
|
11 |
-
|
|
|
|
|
12 |
sys.path.append(os.path.join(os.getcwd(), "GroundingDINO"))
|
13 |
sys.path.append(os.path.join(os.getcwd(), "sam-hq"))
|
14 |
|
|
|
|
|
|
|
|
|
|
|
15 |
# Fetch code from a private repo
|
16 |
code_path = hf_hub_download(
|
17 |
repo_id="rootglitch/CarVizGradioDemo01",
|
|
|
2 |
import sys
|
3 |
from huggingface_hub import hf_hub_download
|
4 |
|
5 |
+
# Clone repositories correctly
|
6 |
+
os.system("git clone https://github.com/IDEA-Research/GroundingDINO.git")
|
7 |
+
os.system("git clone https://github.com/SysCV/sam-hq.git")
|
8 |
+
|
9 |
+
# Install dependencies correctly
|
10 |
+
os.system("pip install -e GroundingDINO")
|
11 |
+
os.system("pip install -e sam-hq")
|
12 |
+
|
13 |
+
# Ensure the repositories are in Python's path
|
14 |
sys.path.append(os.path.join(os.getcwd(), "GroundingDINO"))
|
15 |
sys.path.append(os.path.join(os.getcwd(), "sam-hq"))
|
16 |
|
17 |
+
# # Download model weights from Hugging Face
|
18 |
+
# hf_hub_download(repo_id="ShilongLiu/GroundingDINO", filename="groundingdino_swint_ogc.pth", local_dir="GroundingDINO")
|
19 |
+
# hf_hub_download(repo_id="lkeab/hq-sam", filename="sam_hq_vit_l.pth", local_dir="sam-hq")
|
20 |
+
|
21 |
+
|
22 |
# Fetch code from a private repo
|
23 |
code_path = hf_hub_download(
|
24 |
repo_id="rootglitch/CarVizGradioDemo01",
|