Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -9,8 +9,8 @@ model = tf.keras.models.load_model('dogcat_model_bak.h5')
|
|
9 |
|
10 |
def classify_image(input_image):
|
11 |
# Load and preprocess the image
|
12 |
-
img1 = image.load_img(input_image
|
13 |
-
img2 = image.load_img(input_image
|
14 |
img = image.img_to_array(img1)
|
15 |
img = img / 255.0
|
16 |
img = np.expand_dims(img, axis=0)
|
|
|
9 |
|
10 |
def classify_image(input_image):
|
11 |
# Load and preprocess the image
|
12 |
+
img1 = image.load_img(input_image, target_size=(64, 64))
|
13 |
+
img2 = image.load_img(input_image)
|
14 |
img = image.img_to_array(img1)
|
15 |
img = img / 255.0
|
16 |
img = np.expand_dims(img, axis=0)
|