Spaces:
Running
Running
Commit
·
92b77a0
1
Parent(s):
dcae606
Update app.py
Browse files
app.py
CHANGED
@@ -96,8 +96,10 @@ image = None
|
|
96 |
if opt == 'Upload image from device':
|
97 |
file = st.file_uploader('Select', type=['jpg', 'png', 'jpeg'])
|
98 |
if file:
|
99 |
-
|
100 |
-
|
|
|
|
|
101 |
try:
|
102 |
if image is not None:
|
103 |
st.image(image, width=256, caption='Uploaded Image')
|
|
|
96 |
if opt == 'Upload image from device':
|
97 |
file = st.file_uploader('Select', type=['jpg', 'png', 'jpeg'])
|
98 |
if file:
|
99 |
+
try:
|
100 |
+
image = preprocess_image(file)
|
101 |
+
except Exception as e:
|
102 |
+
st.error(f"An error occurred: {e}. Please contact us EcoClim Solutions at EcoClimSolutions.wordpress.com.")
|
103 |
try:
|
104 |
if image is not None:
|
105 |
st.image(image, width=256, caption='Uploaded Image')
|