Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -22,8 +22,8 @@ def load_resources():
|
|
| 22 |
# Preprocess the image
|
| 23 |
def preprocess_image(image_path):
|
| 24 |
img1 = cv2.imread(image_path)
|
| 25 |
-
img1 = cv2.resize(img1, (64, 64)) # Resize to 64x64
|
| 26 |
-
img1 = np.asarray(img1) # Shape: (64, 64, 3)
|
| 27 |
img1 = img1[np.newaxis, :, :, :] # Shape: (1, 64, 64, 3)
|
| 28 |
return img1
|
| 29 |
|
|
|
|
| 22 |
# Preprocess the image
|
| 23 |
def preprocess_image(image_path):
|
| 24 |
img1 = cv2.imread(image_path)
|
| 25 |
+
img1 = cv2.resize(img1, (64, 64, 3)) # Resize to 64x64
|
| 26 |
+
# img1 = np.asarray(img1) # Shape: (64, 64, 3)
|
| 27 |
img1 = img1[np.newaxis, :, :, :] # Shape: (1, 64, 64, 3)
|
| 28 |
return img1
|
| 29 |
|