Spaces:
Sleeping
Sleeping
till-onethousand
commited on
Commit
·
71ade5a
1
Parent(s):
6973993
app.py
CHANGED
@@ -11,7 +11,7 @@ model = None
|
|
11 |
def predict_image(img, conf_threshold, iou_threshold, model_name):
|
12 |
"""Predicts objects in an image using a YOLOv8 model with adjustable confidence and IOU thresholds."""
|
13 |
os.chdir('/home/user/app/model')
|
14 |
-
os.system(f'/home/user/app/model/darknet detect /home/user/app/model/cfg/yolov2.cfg /home/user/app/model/yolov2.weights
|
15 |
|
16 |
return '/home/user/app/model/predictions.jpg'
|
17 |
|
|
|
11 |
def predict_image(img, conf_threshold, iou_threshold, model_name):
|
12 |
"""Predicts objects in an image using a YOLOv8 model with adjustable confidence and IOU thresholds."""
|
13 |
os.chdir('/home/user/app/model')
|
14 |
+
os.system(f'/home/user/app/model/darknet detect /home/user/app/model/cfg/yolov2.cfg /home/user/app/model/yolov2.weights {img}')
|
15 |
|
16 |
return '/home/user/app/model/predictions.jpg'
|
17 |
|