Spaces:
Running
Running
Commit
·
f3fa2b6
1
Parent(s):
cefd4c5
Update app.py
Browse files
app.py
CHANGED
@@ -29,12 +29,12 @@ opt = st.selectbox("How do you want to upload the image for classification?", ('
|
|
29 |
if opt == 'Upload image from device':
|
30 |
file = st.file_uploader('Select', type=['jpg', 'png', 'jpeg'])
|
31 |
if file is not None:
|
32 |
-
image = Image.open(file).resize((256, 256)#, Image.LANCZOS)
|
33 |
|
34 |
elif opt == 'Upload image via link':
|
35 |
img_url = st.text_input('Enter the Image Address')
|
36 |
try:
|
37 |
-
image = Image.open(urllib.request.urlopen(img_url)).resize((256, 256)#, Image.LANCZOS)
|
38 |
except ValueError:
|
39 |
st.error("Please Enter a valid Image Address!")
|
40 |
|
|
|
29 |
if opt == 'Upload image from device':
|
30 |
file = st.file_uploader('Select', type=['jpg', 'png', 'jpeg'])
|
31 |
if file is not None:
|
32 |
+
image = Image.open(file).resize((256, 256))#, Image.LANCZOS)
|
33 |
|
34 |
elif opt == 'Upload image via link':
|
35 |
img_url = st.text_input('Enter the Image Address')
|
36 |
try:
|
37 |
+
image = Image.open(urllib.request.urlopen(img_url)).resize((256, 256))#, Image.LANCZOS)
|
38 |
except ValueError:
|
39 |
st.error("Please Enter a valid Image Address!")
|
40 |
|