Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -60,7 +60,7 @@ def yolov8_img_inference(
|
|
60 |
object_counts = {x: 0 for x in names}
|
61 |
for r in results:
|
62 |
for c in r.boxes.cls:
|
63 |
-
c = int(c)
|
64 |
if c in names:
|
65 |
object_counts[c] += 1
|
66 |
elif c not in names:
|
|
|
60 |
object_counts = {x: 0 for x in names}
|
61 |
for r in results:
|
62 |
for c in r.boxes.cls:
|
63 |
+
c = c.add(names[int(c)])
|
64 |
if c in names:
|
65 |
object_counts[c] += 1
|
66 |
elif c not in names:
|