Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -3,8 +3,6 @@ from ultralytics import YOLO
|
|
3 |
import spaces
|
4 |
import supervision as sv
|
5 |
|
6 |
-
|
7 |
-
|
8 |
box_annotator = sv.BoxAnnotator()
|
9 |
|
10 |
category_dict = {
|
@@ -28,7 +26,6 @@ category_dict = {
|
|
28 |
|
29 |
@spaces.GPU(duration=200)
|
30 |
def LeYOLO_inference(image, model_id, image_size, conf_threshold, iou_threshold):
|
31 |
-
model_path = download_models(model_id)
|
32 |
model = model = YOLO(f"kadirnar/{model_id}")
|
33 |
results = model(source=image, imgsz=image_size, iou=iou_threshold, conf=conf_threshold, verbose=False)[0]
|
34 |
detections = sv.Detections.from_ultralytics(results)
|
@@ -137,7 +134,7 @@ with gradio_app:
|
|
137 |
gr.HTML(
|
138 |
"""
|
139 |
<h1 style='text-align: center'>
|
140 |
-
|
141 |
</h1>
|
142 |
""")
|
143 |
gr.HTML(
|
|
|
3 |
import spaces
|
4 |
import supervision as sv
|
5 |
|
|
|
|
|
6 |
box_annotator = sv.BoxAnnotator()
|
7 |
|
8 |
category_dict = {
|
|
|
26 |
|
27 |
@spaces.GPU(duration=200)
|
28 |
def LeYOLO_inference(image, model_id, image_size, conf_threshold, iou_threshold):
|
|
|
29 |
model = model = YOLO(f"kadirnar/{model_id}")
|
30 |
results = model(source=image, imgsz=image_size, iou=iou_threshold, conf=conf_threshold, verbose=False)[0]
|
31 |
detections = sv.Detections.from_ultralytics(results)
|
|
|
134 |
gr.HTML(
|
135 |
"""
|
136 |
<h1 style='text-align: center'>
|
137 |
+
LeYOLO, New Scalable and Efficient CNN Architecture for Object Detection
|
138 |
</h1>
|
139 |
""")
|
140 |
gr.HTML(
|