Dricz commited on
Commit
8f46261
1 Parent(s): 1425272

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -7
app.py CHANGED
@@ -16,13 +16,13 @@ model = YOLO('best (1).pt')
16
  def response(image):
17
  print(image)
18
  results = model(image)
19
- text=""
20
- for r in results:
21
- conf = np.array(r.boxes.conf)
22
- cls = np.array(r.boxes.cls)
23
- cls = cls.astype(int)
24
- for con, cl in zip(conf,cls):
25
- text += (f"Detected {name[cl]} with confidence {con} at \n")
26
 
27
 
28
  # im_rgb = Image.fromarray(im_rgb)
 
16
  def response(image):
17
  print(image)
18
  results = model(image)
19
+ text=""
20
+ for r in results:
21
+ conf = np.array(r.boxes.conf)
22
+ cls = np.array(r.boxes.cls)
23
+ cls = cls.astype(int)
24
+ for con, cl in zip(conf,cls):
25
+ text += (f"Detected {name[cl]} with confidence {con} at \n")
26
 
27
 
28
  # im_rgb = Image.fromarray(im_rgb)