Update app.py
Browse files
app.py
CHANGED
|
@@ -45,6 +45,7 @@ def classify_image(image):
|
|
| 45 |
image = np.array(image)
|
| 46 |
# Preprocess the image
|
| 47 |
image = cv2.resize(image, (180, 180))
|
|
|
|
| 48 |
# Make prediction
|
| 49 |
preds = model.predict(image[np.newaxis, ...]).squeeze()
|
| 50 |
y_pred = preds.argmax(axis = 0) # Decode prediction
|
|
|
|
| 45 |
image = np.array(image)
|
| 46 |
# Preprocess the image
|
| 47 |
image = cv2.resize(image, (180, 180))
|
| 48 |
+
image = image/255
|
| 49 |
# Make prediction
|
| 50 |
preds = model.predict(image[np.newaxis, ...]).squeeze()
|
| 51 |
y_pred = preds.argmax(axis = 0) # Decode prediction
|