Dricz commited on
Commit
c7bdf25
1 Parent(s): 7ba0645

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -36,7 +36,7 @@ def response2(image: gr.Image = None,image_size: gr.Slider = 640, conf_threshold
36
  # # im_rgb = Image.fromarray(im_rgb)
37
  text = ""
38
  for score, label, box in zip(results["scores"], results["labels"], results["boxes"]):
39
- box = [round(i, 2) for i in box.tolist()]
40
 
41
  text = text + (f"Detected {model.config.id2label[label.item()]} with confidence, {round(score.item(), 3)} at location {box}")
42
 
 
36
  # # im_rgb = Image.fromarray(im_rgb)
37
  text = ""
38
  for score, label, box in zip(results["scores"], results["labels"], results["boxes"]):
39
+ box = [round(i, 2) for i in box.tolist()]
40
 
41
  text = text + (f"Detected {model.config.id2label[label.item()]} with confidence, {round(score.item(), 3)} at location {box}")
42