Dricz commited on
Commit
86d95b2
1 Parent(s): 3fdaf1b

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -30,9 +30,9 @@ def response2(image: gr.Image = None,image_size: gr.Slider = 640, conf_threshold
30
 
31
  text = ""
32
 
33
- for score, label, box in zip(result.scores, result.labels, result.boxes):
34
- box = [round(i, 2) for i in box.tolist()]
35
- text += f"Detected {model.config.id2label[label.item()]} with confidence {round(score.item(), 3)} at location {box}\n"
36
 
37
  return render,text
38
 
 
30
 
31
  text = ""
32
 
33
+ for score, label, box in zip(result.scores, result.labels, result.boxes):
34
+ box = [round(i, 2) for i in box.tolist()]
35
+ text += f"Detected {model.config.id2label[label.item()]} with confidence {round(score.item(), 3)} at location {box}\n"
36
 
37
  return render,text
38