Update handler.py
Browse files- handler.py +2 -1
handler.py
CHANGED
|
@@ -9,7 +9,8 @@ class EndpointHandler():
|
|
| 9 |
self.model = YOLO(hf_hub_download(repo_id="Drazcat-AI/flejes", filename="yolov8_flejes/runs/detect/train/weights/best.pt", local_files_only=True))
|
| 10 |
|
| 11 |
def predict_objects(self, image_path):
|
| 12 |
-
results = self.model(image_path, imgsz=1280)
|
|
|
|
| 13 |
predictions = []
|
| 14 |
for box in results[0].boxes:
|
| 15 |
class_id = results[0].names[box.cls[0].item()]
|
|
|
|
| 9 |
self.model = YOLO(hf_hub_download(repo_id="Drazcat-AI/flejes", filename="yolov8_flejes/runs/detect/train/weights/best.pt", local_files_only=True))
|
| 10 |
|
| 11 |
def predict_objects(self, image_path):
|
| 12 |
+
#results = self.model(image_path, imgsz=1280)
|
| 13 |
+
results = self.model(image_path, imgsz=800)
|
| 14 |
predictions = []
|
| 15 |
for box in results[0].boxes:
|
| 16 |
class_id = results[0].names[box.cls[0].item()]
|