Spaces:
Runtime error
Runtime error
Commit ·
7c8a817
1
Parent(s): 4ec8f2c
Update app.py
Browse files
app.py
CHANGED
|
@@ -34,7 +34,7 @@ def yolov8_inference(
|
|
| 34 |
|
| 35 |
model = YOLO("https://huggingface.co/spaces/devisionx/Amazon_demo/blob/main/amazon.pt")
|
| 36 |
|
| 37 |
-
results = model(image,conf=conf_threshold,iou=iou_threshold ,imgsz=1280)[0]
|
| 38 |
detections = sv.Detections.from_yolov8(results)
|
| 39 |
annotated_image = annotatorbbox.annotate(scene=image, detections=detections)
|
| 40 |
annotated_image = annotatormask.annotate(scene=annotated_image, detections=detections)
|
|
|
|
| 34 |
|
| 35 |
model = YOLO("https://huggingface.co/spaces/devisionx/Amazon_demo/blob/main/amazon.pt")
|
| 36 |
|
| 37 |
+
results = model(image,conf=conf_threshold,iou=iou_threshold ,imgsz=1280,half=True)[0]
|
| 38 |
detections = sv.Detections.from_yolov8(results)
|
| 39 |
annotated_image = annotatorbbox.annotate(scene=image, detections=detections)
|
| 40 |
annotated_image = annotatormask.annotate(scene=annotated_image, detections=detections)
|