Dricz commited on
Commit
f7f150f
·
verified ·
1 Parent(s): ec1c8b6

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -34,12 +34,12 @@ def response2(image: gr.Image = None,image_size: gr.Slider = 640, conf_threshold
34
 
35
  for r in results:
36
  conf = r.boxes.conf
37
- cls = r.boxes.cls
38
  xywh = int(r.boxes.xywh)
39
  x = xywh[0]
40
  y = xywh[1]
41
 
42
- text += (f"Detected {label[int(cls)]} with confidence {double(conf)} at {x}, {y}\n")
43
 
44
  return render,text
45
 
 
34
 
35
  for r in results:
36
  conf = r.boxes.conf
37
+ cls = int(r.boxes.cls)
38
  xywh = int(r.boxes.xywh)
39
  x = xywh[0]
40
  y = xywh[1]
41
 
42
+ text += (f"Detected {label["cls"]} with confidence {double(conf)} at {x}, {y}\n")
43
 
44
  return render,text
45