Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -48,9 +48,9 @@ def yolov8_img_inference(
|
|
48 |
# model = YOLO(model_path)
|
49 |
global current_model_id
|
50 |
global model
|
51 |
-
if
|
52 |
-
model = YOLO(
|
53 |
-
current_model_id =
|
54 |
model.conf = conf_threshold
|
55 |
model.iou = iou_threshold
|
56 |
# model.overrides['conf'] = conf_threshold
|
|
|
48 |
# model = YOLO(model_path)
|
49 |
global current_model_id
|
50 |
global model
|
51 |
+
if model_path != current_model_id:
|
52 |
+
model = YOLO(model_path)
|
53 |
+
current_model_id = model_path
|
54 |
model.conf = conf_threshold
|
55 |
model.iou = iou_threshold
|
56 |
# model.overrides['conf'] = conf_threshold
|