Spaces:
Running
Running
till-onethousand
commited on
Commit
·
02d3d6b
1
Parent(s):
7e557a8
app.py
CHANGED
@@ -10,7 +10,8 @@ model = None
|
|
10 |
|
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.
|
|
|
14 |
|
15 |
return '/home/user/app/model/predictions.jpg'
|
16 |
|
|
|
10 |
|
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 /home/user/app/model/data/dog.jpg')
|
15 |
|
16 |
return '/home/user/app/model/predictions.jpg'
|
17 |
|
run.py
CHANGED
@@ -1,3 +1,3 @@
|
|
1 |
import os
|
2 |
-
os.chdir('
|
3 |
-
os.system('
|
|
|
1 |
import os
|
2 |
+
os.chdir('/Users/tillwenke/Documents/darknet')
|
3 |
+
os.system(f'/Users/tillwenke/Documents/darknet/darknet detect /Users/tillwenke/Documents/darknet/cfg/yolov2.cfg /Users/tillwenke/Documents/darknet/yolov2.weights /Users/tillwenke/Documents/darknet/data/dog.jpg')
|