jableable commited on
Commit
14a5348
·
verified ·
1 Parent(s): 6f30970

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -13,11 +13,11 @@ uploaded_img = st.file_uploader("Upload your file here...",type=['png', 'jpeg',
13
  if uploaded_img is not None:
14
  st.image(uploaded_img)
15
  img = Image.open(uploaded_img)
 
16
  resized_img = img.resize((160,160))
 
17
  input_arr = keras.preprocessing.image.img_to_array(resized_img)
18
  print(input_arr.shape)
19
- input_arr = np.array([input_arr])
20
- print(input_arr.shape)
21
  input_arr = input_arr.astype('float32') / 255.
22
  print(input_arr.shape)
23
  result = loaded_model.predict(input_arr)
 
13
  if uploaded_img is not None:
14
  st.image(uploaded_img)
15
  img = Image.open(uploaded_img)
16
+ print(img.mode)
17
  resized_img = img.resize((160,160))
18
+ print(img.mode)
19
  input_arr = keras.preprocessing.image.img_to_array(resized_img)
20
  print(input_arr.shape)
 
 
21
  input_arr = input_arr.astype('float32') / 255.
22
  print(input_arr.shape)
23
  result = loaded_model.predict(input_arr)