brian25 commited on
Commit
388c2c3
·
verified ·
1 Parent(s): b0de5d8

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -5,10 +5,10 @@ from ultralytics import YOLO
5
  model = YOLO("best.pt")
6
 
7
  def greet(source):
8
-
9
- result = model(source) # return a list of Results objects
10
-
11
- return result
12
 
13
  demo = gr.Interface(fn=greet, inputs="image", outputs="image")
14
  demo.launch()
 
5
  model = YOLO("best.pt")
6
 
7
  def greet(source):
8
+ model = YOLO("best.pt")
9
+ results = model.predict('/content/download.png', imgsz=1080, conf=0.25)
10
+ result = results[0]
11
+ return result.plot()
12
 
13
  demo = gr.Interface(fn=greet, inputs="image", outputs="image")
14
  demo.launch()