Update app.py
Browse files
app.py
CHANGED
|
@@ -38,8 +38,10 @@ def predict_image(input_img_pil):
|
|
| 38 |
|
| 39 |
# 1. Preprocessing: Resize and convert to NumPy array
|
| 40 |
img_resized = input_img_pil.resize(IMAGE_SIZE)
|
|
|
|
| 41 |
img_array = keras.preprocessing.image.img_to_array(img_resized)
|
| 42 |
-
|
|
|
|
| 43 |
# 2. Rescaling and Batch dimension:
|
| 44 |
# Keras models usually expect input shapes like (Batch_Size, Height, Width, Channels)
|
| 45 |
# and often expect pixel values to be normalized (e.g., 0-1 range).
|
|
|
|
| 38 |
|
| 39 |
# 1. Preprocessing: Resize and convert to NumPy array
|
| 40 |
img_resized = input_img_pil.resize(IMAGE_SIZE)
|
| 41 |
+
print("image resized")
|
| 42 |
img_array = keras.preprocessing.image.img_to_array(img_resized)
|
| 43 |
+
print(" image converted to array")
|
| 44 |
+
|
| 45 |
# 2. Rescaling and Batch dimension:
|
| 46 |
# Keras models usually expect input shapes like (Batch_Size, Height, Width, Channels)
|
| 47 |
# and often expect pixel values to be normalized (e.g., 0-1 range).
|