Dricz commited on
Commit
3fdaf1b
1 Parent(s): 78dbbdb

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -29,7 +29,7 @@ def response2(image: gr.Image = None,image_size: gr.Slider = 640, conf_threshold
29
  render = render_result(model=model, image=image, result=results[0], rect_th = 1, text_th = 1)
30
 
31
  text = ""
32
- for result in results:
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"
 
29
  render = render_result(model=model, image=image, result=results[0], rect_th = 1, text_th = 1)
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"