brian25 commited on
Commit
e307b4d
·
verified ·
1 Parent(s): 68bdcf9

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -9
app.py CHANGED
@@ -4,17 +4,10 @@ from ultralytics import YOLO
4
 
5
  model = YOLO("best.pt")
6
 
7
- def greet(detection):
8
 
9
- results = model(detection) # return a list of Results objects
10
 
11
- for result in results:
12
- boxes = result.boxes # Boxes object for bounding box outputs
13
- masks = result.masks # Masks object for segmentation masks outputs
14
- keypoints = result.keypoints # Keypoints object for pose outputs
15
- probs = result.probs # Probs object for classification outputs
16
- obb = result.obb # Oriented boxes object for OBB outputs
17
- result.show() # display to screen
18
  return result.show()
19
 
20
  demo = gr.Interface(fn=greet, inputs="image", outputs="image")
 
4
 
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.show()
12
 
13
  demo = gr.Interface(fn=greet, inputs="image", outputs="image")