Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -1,7 +1,6 @@
|
|
1 |
import gradio as gr
|
2 |
from ultralytics import YOLO
|
3 |
import supervision as sv
|
4 |
-
import spaces
|
5 |
|
6 |
|
7 |
box_annotator = sv.BoxAnnotator()
|
@@ -25,7 +24,7 @@ category_dict = {
|
|
25 |
}
|
26 |
|
27 |
|
28 |
-
|
29 |
def yolov10_inference(image, model_id, image_size, conf_threshold, iou_threshold):
|
30 |
model = YOLO(f"{model_id}.pt")
|
31 |
results = model(source=image, imgsz=image_size, iou=iou_threshold, conf=conf_threshold, verbose=False)[0]
|
|
|
1 |
import gradio as gr
|
2 |
from ultralytics import YOLO
|
3 |
import supervision as sv
|
|
|
4 |
|
5 |
|
6 |
box_annotator = sv.BoxAnnotator()
|
|
|
24 |
}
|
25 |
|
26 |
|
27 |
+
|
28 |
def yolov10_inference(image, model_id, image_size, conf_threshold, iou_threshold):
|
29 |
model = YOLO(f"{model_id}.pt")
|
30 |
results = model(source=image, imgsz=image_size, iou=iou_threshold, conf=conf_threshold, verbose=False)[0]
|