Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -14,7 +14,7 @@ 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 |
-
|
18 |
input_arr = np.array([input_arr])
|
19 |
input_arr = input_arr.astype('float32') / 255.
|
20 |
result = loaded_model.predict(input_arr)
|
|
|
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 |
input_arr = np.array([input_arr])
|
19 |
input_arr = input_arr.astype('float32') / 255.
|
20 |
result = loaded_model.predict(input_arr)
|