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