Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -22,11 +22,9 @@ def predict(img):
|
|
22 |
size = (224, 224)
|
23 |
image = ImageOps.fit(image, size)
|
24 |
#turn the image into a numpy array
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
# Load the image into the array
|
29 |
-
data[0] = normalized_image_array
|
30 |
# run the inference
|
31 |
prediction = model.predict(data)
|
32 |
gr.outputs.Label = open(labels.txt)
|
|
|
22 |
size = (224, 224)
|
23 |
image = ImageOps.fit(image, size)
|
24 |
#turn the image into a numpy array
|
25 |
+
|
26 |
+
|
27 |
+
data[0] = np.asarray(image)
|
|
|
|
|
28 |
# run the inference
|
29 |
prediction = model.predict(data)
|
30 |
gr.outputs.Label = open(labels.txt)
|