Spaces:
Build error
Build error
Update app.py
Browse filesfixed rgb format
app.py
CHANGED
|
@@ -79,10 +79,9 @@ def yolo_inference_tool():
|
|
| 79 |
|
| 80 |
# Annotated image
|
| 81 |
try:
|
| 82 |
-
|
| 83 |
-
annotated_img_rgb = Image.fromarray(annotated_img_bgr[..., ::-1])
|
| 84 |
st.subheader("Annotated Image")
|
| 85 |
-
st.image(
|
| 86 |
except Exception as e:
|
| 87 |
st.error(f"Error generating annotated image: {e}")
|
| 88 |
|
|
|
|
| 79 |
|
| 80 |
# Annotated image
|
| 81 |
try:
|
| 82 |
+
annotated_img_pil = r.plot(conf=True, boxes=True, labels=True, pil=True)
|
|
|
|
| 83 |
st.subheader("Annotated Image")
|
| 84 |
+
st.image(annotated_img_pil, caption="Inference Output", use_container_width=True)
|
| 85 |
except Exception as e:
|
| 86 |
st.error(f"Error generating annotated image: {e}")
|
| 87 |
|