dzmu commited on
Commit
270c439
·
verified ·
1 Parent(s): 3d066d3

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +15 -2
app.py CHANGED
@@ -12,9 +12,22 @@ import time
12
  import tempfile
13
  #test
14
  # --- Configuration ---
 
 
15
  DEVICE = "cuda" if torch.cuda.is_available() else "cpu"
16
- YOLO_PERSON_MODEL_PATH = 'yolov8n.pt' # Standard YOLOv8 for person detection
17
- YOLO_FASHION_MODEL_PATH = 'best.pt' # <<< Your custom fashion model path
 
 
 
 
 
 
 
 
 
 
 
18
  CLIP_MODEL_NAME = "ViT-B/32"
19
 
20
  # Confidence Thresholds
 
12
  import tempfile
13
  #test
14
  # --- Configuration ---
15
+ HF_TOKEN = os.environ.get("HF_TOKEN")
16
+
17
  DEVICE = "cuda" if torch.cuda.is_available() else "cpu"
18
+ YOLO_PERSON_MODEL_PATH = hf_hub_download(
19
+ repo_id="dzmu/dripai-models",
20
+ filename="yolov8n.pt",
21
+ token=HF_TOKEN,
22
+ repo_type="model"
23
+ )
24
+
25
+ YOLO_FASHION_MODEL_PATH = hf_hub_download(
26
+ repo_id="dzmu/dripai-models",
27
+ filename="best.pt",
28
+ token=HF_TOKEN,
29
+ repo_type="model"
30
+ )
31
  CLIP_MODEL_NAME = "ViT-B/32"
32
 
33
  # Confidence Thresholds