till-onethousand commited on
Commit
a8f5878
·
1 Parent(s): f723566
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -10,10 +10,10 @@ 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.chdir('./model')
14
  os.system(f'./darknet detect cfg/yolov2.cfg yolov2.weights data/dog.jpg')
15
 
16
- return './model/predictions.jpg'
17
 
18
 
19
  iface = gr.Interface(
 
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'./darknet detect cfg/yolov2.cfg yolov2.weights data/dog.jpg')
15
 
16
+ return '/home/user/app/model/predictions.jpg'
17
 
18
 
19
  iface = gr.Interface(