DurgaDeepak commited on
Commit
5567efd
·
verified ·
1 Parent(s): 938c288

Update models/detection/detector.py

Browse files
Files changed (1) hide show
  1. models/detection/detector.py +3 -2
models/detection/detector.py CHANGED
@@ -1,5 +1,5 @@
1
  import logging
2
- from PIL import Image
3
  from huggingface_hub import hf_hub_download
4
  from ultralytics import YOLO
5
 
@@ -48,7 +48,8 @@ class ObjectDetector:
48
  weights_path = hf_hub_download(
49
  repo_id=repo_id,
50
  filename=filename,
51
- cache_dir="models/detection/weights"
 
52
  )
53
 
54
  self.device = device
 
1
  import logging
2
+ from PIL import Image, ImageDraw
3
  from huggingface_hub import hf_hub_download
4
  from ultralytics import YOLO
5
 
 
48
  weights_path = hf_hub_download(
49
  repo_id=repo_id,
50
  filename=filename,
51
+ cache_dir="models/detection/weights",
52
+ force_download=True #Clear cache
53
  )
54
 
55
  self.device = device