gatesla commited on
Commit
791042b
·
1 Parent(s): 3bef0e5

Update app.py

Browse files

Fixing the format issue

Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -90,7 +90,7 @@ def detect_objects(model_name,url_input,image_input,threshold):
90
  final_str = ""
91
  for score, label, box in zip(processed_outputs["scores"], processed_outputs["labels"], processed_outputs["boxes"]):
92
  box = [round(i, 2) for i in box.tolist()]
93
- final_str += f"Detected {model.config.id2label[label.item()]} with confidence {score.item(), 3} at location {box}"
94
 
95
 
96
  return viz_img, final_str
 
90
  final_str = ""
91
  for score, label, box in zip(processed_outputs["scores"], processed_outputs["labels"], processed_outputs["boxes"]):
92
  box = [round(i, 2) for i in box.tolist()]
93
+ final_str += f"Detected `{model.config.id2label[label.item()]}` with confidence `{score.item(), 3}` at location `{box}`\n"
94
 
95
 
96
  return viz_img, final_str