linhcuem commited on
Commit
e33e666
1 Parent(s): eca09e4

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -43,7 +43,7 @@ def yolov8_img_inference(
43
  # image = read_image
44
  results = model.predict(image)
45
  render = render_result(model=model, image=image, result=results[0])
46
- count_result = results[0].boxes.cls.tolist().count('name')
47
  # count_result = results.pandas().xyxy[0].value_counts('name')
48
  return render, count_result
49
 
 
43
  # image = read_image
44
  results = model.predict(image)
45
  render = render_result(model=model, image=image, result=results[0])
46
+ count_result = results[0].boxes.cls.tolist().count(model.names)
47
  # count_result = results.pandas().xyxy[0].value_counts('name')
48
  return render, count_result
49