Spaces:
Runtime error
Runtime error
changed import of img_to_array() function (#2)
Browse files- changed import of img_to_array() function (3d7b320baca22b4d2f354b44d00e3a4d36a8ba27)
Co-authored-by: Xyloplax <[email protected]>
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)
|