fabianOnethousandAi commited on
Commit
8b7e07f
·
1 Parent(s): 4a18dbc

darknet made on linux machine

Browse files
Files changed (1) hide show
  1. app.py +2 -3
app.py CHANGED
@@ -11,10 +11,9 @@ 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('ls -l')
15
- # 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')
16
 
17
- return '/home/user/app/model/data/dog.jpg'
18
 
19
 
20
  iface = gr.Interface(
 
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
 
18
 
19
  iface = gr.Interface(