Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -443,23 +443,16 @@ if page == "🏠 Home & Classification":
|
|
| 443 |
type=['jpg', 'jpeg', 'png', 'bmp', 'webp'],
|
| 444 |
help="Upload a clear image of the waste item"
|
| 445 |
)
|
| 446 |
-
|
| 447 |
-
|
| 448 |
-
|
| 449 |
-
|
| 450 |
-
# Use camera image if available, otherwise use uploaded file
|
| 451 |
-
if camera_image is not None:
|
| 452 |
-
image = Image.open(camera_image)
|
| 453 |
-
st.success("✅ Photo captured successfully!")
|
| 454 |
-
elif uploaded_file is not None:
|
| 455 |
-
image = Image.open(uploaded_file)
|
| 456 |
st.success("✅ Image uploaded successfully!")
|
| 457 |
else:
|
| 458 |
image = None
|
| 459 |
-
st.info("👆 Please upload an image
|
| 460 |
-
|
| 461 |
st.markdown('</div>', unsafe_allow_html=True)
|
| 462 |
-
|
| 463 |
# Display uploaded image
|
| 464 |
if image is not None:
|
| 465 |
st.markdown('<div class="card">', unsafe_allow_html=True)
|
|
|
|
| 443 |
type=['jpg', 'jpeg', 'png', 'bmp', 'webp'],
|
| 444 |
help="Upload a clear image of the waste item"
|
| 445 |
)
|
| 446 |
+
|
| 447 |
+
if uploaded_file is not None:
|
| 448 |
+
image = Image.open(uploaded_file).convert("RGB")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 449 |
st.success("✅ Image uploaded successfully!")
|
| 450 |
else:
|
| 451 |
image = None
|
| 452 |
+
st.info("👆 Please upload an image to begin")
|
| 453 |
+
|
| 454 |
st.markdown('</div>', unsafe_allow_html=True)
|
| 455 |
+
|
| 456 |
# Display uploaded image
|
| 457 |
if image is not None:
|
| 458 |
st.markdown('<div class="card">', unsafe_allow_html=True)
|