Guy2 commited on
Commit
a00dc8b
1 Parent(s): 2010974

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -2
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
- return labels
 
 
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