DurgaDeepak commited on
Commit
5052f14
·
verified ·
1 Parent(s): d3ceedc

Update models/detection/detector.py

Browse files
Files changed (1) hide show
  1. models/detection/detector.py +3 -1
models/detection/detector.py CHANGED
@@ -51,8 +51,10 @@ class ObjectDetector:
51
 
52
  def predict(self, image: Image.Image, conf_threshold=0.25):
53
  self.load_model()
 
54
  if self.model is None:
55
- raise RuntimeError("YOLO model not loaded. Call load_model() first.")
 
56
  results = self.model(image)
57
  detections = []
58
  for r in results:
 
51
 
52
  def predict(self, image: Image.Image, conf_threshold=0.25):
53
  self.load_model()
54
+
55
  if self.model is None:
56
+ raise RuntimeError("YOLO model not loaded. Call load_model() first.")
57
+
58
  results = self.model(image)
59
  detections = []
60
  for r in results: