Spaces:
Runtime error
Runtime error
Commit
·
f695925
1
Parent(s):
2adf03d
Fix imports
Browse files
app.py
CHANGED
|
@@ -23,9 +23,9 @@ sys.path.append("tag2text")
|
|
| 23 |
sys.path.append("GroundingDINO")
|
| 24 |
|
| 25 |
from tag2text.models import tag2text
|
| 26 |
-
from
|
| 27 |
from config import *
|
| 28 |
-
from utils import download_file_hf, detect, segment,
|
| 29 |
|
| 30 |
if not os.path.exists(abs_weight_dir):
|
| 31 |
os.makedirs(abs_weight_dir, exist_ok=True)
|
|
|
|
| 23 |
sys.path.append("GroundingDINO")
|
| 24 |
|
| 25 |
from tag2text.models import tag2text
|
| 26 |
+
from groundingdino.util.inference import Model as DinoModel
|
| 27 |
from config import *
|
| 28 |
+
from utils import download_file_hf, detect, segment, show_anns_sam, generate_tags
|
| 29 |
|
| 30 |
if not os.path.exists(abs_weight_dir):
|
| 31 |
os.makedirs(abs_weight_dir, exist_ok=True)
|
utils.py
CHANGED
|
@@ -17,10 +17,10 @@ from segment_anything import SamPredictor
|
|
| 17 |
sys.path.append("tag2text")
|
| 18 |
sys.path.append("GroundingDINO")
|
| 19 |
|
| 20 |
-
from
|
| 21 |
-
from
|
| 22 |
-
from
|
| 23 |
-
from
|
| 24 |
from tag2text.inference import inference as tag2text_inference
|
| 25 |
|
| 26 |
|
|
|
|
| 17 |
sys.path.append("tag2text")
|
| 18 |
sys.path.append("GroundingDINO")
|
| 19 |
|
| 20 |
+
from groundingdino.models import build_model
|
| 21 |
+
from groundingdino.util.inference import Model as DinoModel
|
| 22 |
+
from groundingdino.util.slconfig import SLConfig
|
| 23 |
+
from groundingdino.util.utils import clean_state_dict
|
| 24 |
from tag2text.inference import inference as tag2text_inference
|
| 25 |
|
| 26 |
|