Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -10,7 +10,7 @@ def download_models(model_id):
|
|
10 |
return f"./{model_id}"
|
11 |
|
12 |
box_annotator = sv.BoxAnnotator()
|
13 |
-
category_dict = {
|
14 |
|
15 |
|
16 |
@spaces.GPU(duration=200)
|
@@ -21,8 +21,7 @@ def yolov10_inference(image, model_id, image_size, conf_threshold, iou_threshold
|
|
21 |
detections = sv.Detections.from_ultralytics(results)
|
22 |
|
23 |
labels = [
|
24 |
-
|
25 |
-
for class_id, confidence in zip(detections.class_id, detections.confidence)
|
26 |
]
|
27 |
annotated_image = box_annotator.annotate(image, detections=detections, labels=labels)
|
28 |
|
|
|
10 |
return f"./{model_id}"
|
11 |
|
12 |
box_annotator = sv.BoxAnnotator()
|
13 |
+
category_dict = { }
|
14 |
|
15 |
|
16 |
@spaces.GPU(duration=200)
|
|
|
21 |
detections = sv.Detections.from_ultralytics(results)
|
22 |
|
23 |
labels = [
|
24 |
+
'arborio', 'ipsala', 'jasmine', 'karacadag', 'basmati'
|
|
|
25 |
]
|
26 |
annotated_image = box_annotator.annotate(image, detections=detections, labels=labels)
|
27 |
|