Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -36,7 +36,7 @@ with col2:
|
|
36 |
image_data = np.array(canvas_result.image_data)
|
37 |
image_data = image_data.astype(np.uint8)
|
38 |
image = Image.fromarray(image_data)
|
39 |
-
image = image.resize((
|
40 |
image = np.array(image).reshape((1, 28, 28, 1)) / 255.0
|
41 |
|
42 |
prediction = model.predict(image)
|
|
|
36 |
image_data = np.array(canvas_result.image_data)
|
37 |
image_data = image_data.astype(np.uint8)
|
38 |
image = Image.fromarray(image_data)
|
39 |
+
image = image.resize((28, 28)).convert("L")
|
40 |
image = np.array(image).reshape((1, 28, 28, 1)) / 255.0
|
41 |
|
42 |
prediction = model.predict(image)
|