Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -46,10 +46,13 @@ if uploaded_file is not None:
|
|
46 |
# Use an expander to show details in a more organized way
|
47 |
with st.expander("See detected plates details"):
|
48 |
for i, detection in enumerate(detections):
|
|
|
|
|
49 |
st.markdown(f"""
|
50 |
**Plate {i+1}:**
|
51 |
-
- **
|
52 |
-
- **Confidence:** {detection
|
|
|
53 |
""")
|
54 |
else:
|
55 |
st.warning("⚠️ No license plates detected!")
|
|
|
46 |
# Use an expander to show details in a more organized way
|
47 |
with st.expander("See detected plates details"):
|
48 |
for i, detection in enumerate(detections):
|
49 |
+
# Access attributes of the DetectionResult class
|
50 |
+
bbox = detection.bounding_box
|
51 |
st.markdown(f"""
|
52 |
**Plate {i+1}:**
|
53 |
+
- **Label:** {detection.label}
|
54 |
+
- **Confidence:** {detection.confidence:.2f}
|
55 |
+
- **Bounding Box:** (x1: {bbox.x1}, y1: {bbox.y1}, x2: {bbox.x2}, y2: {bbox.y2})
|
56 |
""")
|
57 |
else:
|
58 |
st.warning("⚠️ No license plates detected!")
|