Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -5,7 +5,7 @@ import matplotlib.pyplot as plt
|
|
5 |
import numpy as np
|
6 |
model = tf.keras.models.load_model('dogcat_model_bak.h5')
|
7 |
def image_classifier(img):
|
8 |
-
img1 = image.load_img(img, target_size=(64, 64))
|
9 |
img1 = image.img_to_array(img1)
|
10 |
img1 = img1/255
|
11 |
img1 = np.expand_dims(img1, axis=0)
|
|
|
5 |
import numpy as np
|
6 |
model = tf.keras.models.load_model('dogcat_model_bak.h5')
|
7 |
def image_classifier(img):
|
8 |
+
img1 = image.load_img(str(img), target_size=(64, 64))
|
9 |
img1 = image.img_to_array(img1)
|
10 |
img1 = img1/255
|
11 |
img1 = np.expand_dims(img1, axis=0)
|