Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -17,11 +17,8 @@ category_dict = {0: 'arborio', 1: 'basmati', 2: 'ipsala', 3: 'jasmine', 4: 'kara
|
|
17 |
|
18 |
@spaces.GPU(duration=200)
|
19 |
def yolov10_inference(image, model_id, image_size, conf_threshold, iou_threshold):
|
20 |
-
|
21 |
-
|
22 |
-
model = project.version(2).model
|
23 |
-
# model_path = download_models(model_id)
|
24 |
-
# model = YOLOv10(model_path)
|
25 |
results = model(source=image, imgsz=image_size, iou=iou_threshold, conf=conf_threshold, verbose=False)[0]
|
26 |
detections = sv.Detections.from_ultralytics(results)
|
27 |
|
|
|
17 |
|
18 |
@spaces.GPU(duration=200)
|
19 |
def yolov10_inference(image, model_id, image_size, conf_threshold, iou_threshold):
|
20 |
+
model_path = download_models(model_id)
|
21 |
+
model = YOLOv10(model_path)
|
|
|
|
|
|
|
22 |
results = model(source=image, imgsz=image_size, iou=iou_threshold, conf=conf_threshold, verbose=False)[0]
|
23 |
detections = sv.Detections.from_ultralytics(results)
|
24 |
|