Spaces:
Sleeping
Sleeping
Update app.py
Browse files
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(
|
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 |
|