Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -14,7 +14,7 @@ def predict_image(image):
|
|
| 14 |
|
| 15 |
# Load the image from the file-like object
|
| 16 |
image = tf.keras.preprocessing.image.load_img(image_bytes, target_size=(256, 256))
|
| 17 |
-
img_array = np.array(
|
| 18 |
image = np.expand_dims(img_array, axis=0)
|
| 19 |
|
| 20 |
# Make a prediction
|
|
|
|
| 14 |
|
| 15 |
# Load the image from the file-like object
|
| 16 |
image = tf.keras.preprocessing.image.load_img(image_bytes, target_size=(256, 256))
|
| 17 |
+
img_array = np.array(image) / 255.0
|
| 18 |
image = np.expand_dims(img_array, axis=0)
|
| 19 |
|
| 20 |
# Make a prediction
|