m7mdal7aj commited on
Commit
c7492da
1 Parent(s): f0f6ecf

Update my_model/object_detection.py

Browse files
Files changed (1) hide show
  1. my_model/object_detection.py +3 -1
my_model/object_detection.py CHANGED
@@ -6,6 +6,7 @@ import numpy as np
6
  import cv2
7
  import os
8
  from my_model.utilities import get_path, show_image
 
9
 
10
 
11
 
@@ -61,7 +62,8 @@ class ObjectDetector:
61
  """
62
 
63
  try:
64
- model_path = get_path('deformable-detr-detic', 'models')
 
65
  self.processor = AutoImageProcessor.from_pretrained(model_path)
66
  self.model = AutoModelForObjectDetection.from_pretrained(model_path)
67
  except Exception as e:
 
6
  import cv2
7
  import os
8
  from my_model.utilities import get_path, show_image
9
+ import models.deformable-detr-detic as detic
10
 
11
 
12
 
 
62
  """
63
 
64
  try:
65
+ #model_path = get_path('deformable-detr-detic', 'models') # for use locally
66
+ model_path = detic # for use on HF only
67
  self.processor = AutoImageProcessor.from_pretrained(model_path)
68
  self.model = AutoModelForObjectDetection.from_pretrained(model_path)
69
  except Exception as e: