Update app.py
Browse files
app.py
CHANGED
|
@@ -25,7 +25,7 @@ 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:",
|
| 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("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}"
|