Dricz commited on
Commit
0f835e6
·
verified ·
1 Parent(s): cf85c5d

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -1
app.py CHANGED
@@ -22,7 +22,10 @@ def response(image):
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)
 
22
  cls = np.array(r.boxes.cls)
23
  cls = cls.astype(int)
24
  for con, cl in zip(conf,cls):
25
+ con = con.astype(float)
26
+ con = round(con,3)
27
+ con = con * 100
28
+ text += (f"Detected {name[cl]} with confidence {con}% at ({xy[0]},{xy[1]})\n")
29
 
30
 
31
  # im_rgb = Image.fromarray(im_rgb)