Update app.py
Browse files
app.py
CHANGED
@@ -111,7 +111,9 @@ if canvas_result.image_data is not None:
|
|
111 |
|
112 |
# Correctly reshape the image
|
113 |
image1 = image1.reshape(1, 1, 28, 28).astype('float32')
|
114 |
-
|
|
|
115 |
|
116 |
-
|
117 |
-
|
|
|
|
111 |
|
112 |
# Correctly reshape the image
|
113 |
image1 = image1.reshape(1, 1, 28, 28).astype('float32')
|
114 |
+
prediction = np.argmax(model.predict(image1))
|
115 |
+
st.title(f"Handwritten Digit Prediction: {prediction}")
|
116 |
|
117 |
+
|
118 |
+
# if canvas_result.json_data is not None:
|
119 |
+
# st.dataframe(pd.json_normalize(canvas_result.json_data["objects"]))
|