Lasion commited on
Commit
8fe8be0
1 Parent(s): de8582c
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -3,7 +3,7 @@ from ultralytics import YOLO
3
 
4
  def run(source):
5
  global model
6
- res = model(source)
7
  res_plotted = res[0].plot()
8
  return res_plotted
9
 
@@ -11,7 +11,7 @@ model = YOLO("yolov8n-nckh2023.pt") # Select YOLO model
11
 
12
  gr.Interface(
13
  run,
14
- inputs=gr.Image(label="Upload hot dog candidate", type="filepath"),
15
  outputs=gr.Image(label="Your result"),
16
  title="Motorcyclist, helmet, and license plate detection",
17
  ).launch()
 
3
 
4
  def run(source):
5
  global model
6
+ res = model(source, conf=.5, iou=.5)
7
  res_plotted = res[0].plot()
8
  return res_plotted
9
 
 
11
 
12
  gr.Interface(
13
  run,
14
+ inputs=gr.Image(label="Upload image", type="filepath"),
15
  outputs=gr.Image(label="Your result"),
16
  title="Motorcyclist, helmet, and license plate detection",
17
  ).launch()