Update app.py
Browse files
app.py
CHANGED
@@ -30,7 +30,7 @@ from eval.tools.florence_sam import ObjectDetector
|
|
30 |
import shutil
|
31 |
import yaml
|
32 |
import numpy as np
|
33 |
-
from huggingface_hub import snapshot_download
|
34 |
import os
|
35 |
|
36 |
# FLUX.1-dev
|
@@ -75,6 +75,13 @@ snapshot_download(
|
|
75 |
local_dir_use_symlinks=False
|
76 |
)
|
77 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
78 |
|
79 |
os.environ["FLORENCE2_MODEL_PATH"] = "./checkpoints/Florence-2-large"
|
80 |
os.environ["SAM2_MODEL_PATH"] = "./checkpoints/sam2.1_hiera_large.pt"
|
|
|
30 |
import shutil
|
31 |
import yaml
|
32 |
import numpy as np
|
33 |
+
from huggingface_hub import snapshot_download, hf_hub_download
|
34 |
import os
|
35 |
|
36 |
# FLUX.1-dev
|
|
|
75 |
local_dir_use_symlinks=False
|
76 |
)
|
77 |
|
78 |
+
hf_hub_download(
|
79 |
+
repo_id="facebook/sam2-hiera-large",
|
80 |
+
local_dir="./checkpoints/",
|
81 |
+
filename="sam2_hiera_large.pt",
|
82 |
+
)
|
83 |
+
|
84 |
+
|
85 |
|
86 |
os.environ["FLORENCE2_MODEL_PATH"] = "./checkpoints/Florence-2-large"
|
87 |
os.environ["SAM2_MODEL_PATH"] = "./checkpoints/sam2.1_hiera_large.pt"
|