subh71 commited on
Commit
f322a04
·
verified ·
1 Parent(s): 33bdbd4

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -1
app.py CHANGED
@@ -25,7 +25,9 @@ def model():
25
 
26
  for score, label, box in zip(results["scores"], results["labels"], results["boxes"]):
27
  box = [round(i, 2) for i in box.tolist()]
28
- st.write("Prediction:", results[0]['label'], "| Score:", results[0]['score'])
 
 
29
  #print(
30
  # f"Detected {model.config.id2label[label.item()]} with confidence "
31
  # f"{round(score.item(), 3)} at location {box}"
 
25
 
26
  for score, label, box in zip(results["scores"], results["labels"], results["boxes"]):
27
  box = [round(i, 2) for i in box.tolist()]
28
+ st.write(f"Detected {model.config.id2label[label.item()]} with confidence ")
29
+ st.write(f"{round(score.item(), 3)} at location {box}")
30
+ #st.write("Prediction:", results[0]['label'], "| Score:", results[0]['score'])
31
  #print(
32
  # f"Detected {model.config.id2label[label.item()]} with confidence "
33
  # f"{round(score.item(), 3)} at location {box}"