Spaces:
Running
on
CPU Upgrade
Running
on
CPU Upgrade
changed import of img_to_array() function
Browse files
app.py
CHANGED
@@ -10,7 +10,7 @@ examples = ['examples/179.png', 'examples/493.png', 'examples/780.png']
|
|
10 |
|
11 |
|
12 |
def infer(original_image):
|
13 |
-
image = keras.
|
14 |
image = image.astype("float32") / 255.0
|
15 |
image = np.expand_dims(image, axis=0)
|
16 |
output = model.predict(image)
|
|
|
10 |
|
11 |
|
12 |
def infer(original_image):
|
13 |
+
image = keras.utils.img_to_array(original_image)
|
14 |
image = image.astype("float32") / 255.0
|
15 |
image = np.expand_dims(image, axis=0)
|
16 |
output = model.predict(image)
|