Update app.py
Browse files
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("
|
|
|
|
|
|
|
| 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}"
|