Update app.py
Browse files
app.py
CHANGED
@@ -26,7 +26,7 @@ sahi.utils.file.download_from_url(
|
|
26 |
|
27 |
annotatorbbox = sv.BoxAnnotator()
|
28 |
annotatormask=sv.MaskAnnotator()
|
29 |
-
|
30 |
|
31 |
def yolov8_inference(
|
32 |
image: gr.inputs.Image = None,
|
@@ -37,8 +37,6 @@ def yolov8_inference(
|
|
37 |
):
|
38 |
|
39 |
|
40 |
-
model = YOLO("best_Receipt.pt")
|
41 |
-
|
42 |
results = model(image,conf=conf_threshold,iou=iou_threshold ,imgsz=320)[0]
|
43 |
detections = sv.Detections.from_yolov8(results)
|
44 |
annotated_image = annotatorbbox.annotate(scene=image, detections=detections)
|
|
|
26 |
|
27 |
annotatorbbox = sv.BoxAnnotator()
|
28 |
annotatormask=sv.MaskAnnotator()
|
29 |
+
model = YOLO("best_Receipt.pt")
|
30 |
|
31 |
def yolov8_inference(
|
32 |
image: gr.inputs.Image = None,
|
|
|
37 |
):
|
38 |
|
39 |
|
|
|
|
|
40 |
results = model(image,conf=conf_threshold,iou=iou_threshold ,imgsz=320)[0]
|
41 |
detections = sv.Detections.from_yolov8(results)
|
42 |
annotated_image = annotatorbbox.annotate(scene=image, detections=detections)
|