Spaces:
Running
Running
Commit
·
3b48e73
1
Parent(s):
37e92bb
Update app.py
Browse files
app.py
CHANGED
@@ -30,7 +30,7 @@ if opt == 'Upload image from device':
|
|
30 |
file = st.file_uploader('Select', type=['jpg', 'png', 'jpeg'])
|
31 |
if file is not None:
|
32 |
try:
|
33 |
-
image = Image.open(file).resize((256, 256), Image.LANCZOS)
|
34 |
except Exception as e:
|
35 |
st.error(f"Error: {e}")
|
36 |
|
|
|
30 |
file = st.file_uploader('Select', type=['jpg', 'png', 'jpeg'])
|
31 |
if file is not None:
|
32 |
try:
|
33 |
+
image = Image.open(io.BytesIO(file.read())).resize((256, 256), Image.LANCZOS)
|
34 |
except Exception as e:
|
35 |
st.error(f"Error: {e}")
|
36 |
|