Update app.py
Browse files
app.py
CHANGED
@@ -16,7 +16,7 @@ def get_model_path(model_name):
|
|
16 |
@spaces.GPU
|
17 |
def yolo_inference(images, model_id, conf_threshold, iou_threshold, max_detection):
|
18 |
if images is None:
|
19 |
-
|
20 |
model_path = get_model_path(model_id) # Download model
|
21 |
model_type = RTDETR if 'rtdetr' in model_id.lower() else YOLO
|
22 |
model = model_type(model_path)
|
|
|
16 |
@spaces.GPU
|
17 |
def yolo_inference(images, model_id, conf_threshold, iou_threshold, max_detection):
|
18 |
if images is None:
|
19 |
+
return None
|
20 |
model_path = get_model_path(model_id) # Download model
|
21 |
model_type = RTDETR if 'rtdetr' in model_id.lower() else YOLO
|
22 |
model = model_type(model_path)
|