Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -28,8 +28,10 @@ def anylize(url):
|
|
28 |
|
29 |
# annotate
|
30 |
detections = sv.Detections.from_transformers(transformers_results=results).with_nms(threshold=0.5)
|
31 |
-
labels = [str([list(xyxy), confidence, id2label[class_id]]) for xyxy, _, confidence, class_id, _ in detections]
|
32 |
-
|
|
|
|
|
33 |
# json_list = json.dumps(labels)
|
34 |
# return json_list
|
35 |
|
|
|
28 |
|
29 |
# annotate
|
30 |
detections = sv.Detections.from_transformers(transformers_results=results).with_nms(threshold=0.5)
|
31 |
+
# labels = [str([list(xyxy), confidence, id2label[class_id]]) for xyxy, _, confidence, class_id, _ in detections]
|
32 |
+
labels = [[list(xyxy), confidence, id2label[class_id]] for xyxy, _, confidence, class_id, _ in detections]
|
33 |
+
print(labels)
|
34 |
+
return str(labels)
|
35 |
# json_list = json.dumps(labels)
|
36 |
# return json_list
|
37 |
|