linhcuem commited on
Commit
8451257
1 Parent(s): 1a1ec2d

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -67,8 +67,8 @@ def yolov8_img_inference(
67
  # object_counts[c] = 1
68
  clist = results[0].boxes.cls
69
  cls = set()
70
- for c in clist:
71
- cls.add(names[int(c)])
72
  if c in names:
73
  object_counts[c] += 1
74
  elif c not in names:
 
67
  # object_counts[c] = 1
68
  clist = results[0].boxes.cls
69
  cls = set()
70
+ for cno in clist:
71
+ cls.add(model.names[int(cno)])
72
  if c in names:
73
  object_counts[c] += 1
74
  elif c not in names: