Update app.py
Browse files
app.py
CHANGED
@@ -16,7 +16,7 @@ def predict(image_array):
|
|
16 |
return "Please draw a digit."
|
17 |
|
18 |
image = Image.fromarray(image_array.astype("uint8"), mode="L")
|
19 |
-
image =
|
20 |
image_array = np.array(image).astype("float32") / 255.0
|
21 |
image_array = image_array.reshape(1, 28, 28, 1)
|
22 |
logits = model.predict(image_array)
|
|
|
16 |
return "Please draw a digit."
|
17 |
|
18 |
image = Image.fromarray(image_array.astype("uint8"), mode="L")
|
19 |
+
image = image.resize((28, 28))
|
20 |
image_array = np.array(image).astype("float32") / 255.0
|
21 |
image_array = image_array.reshape(1, 28, 28, 1)
|
22 |
logits = model.predict(image_array)
|