Gosula commited on
Commit
5e61f83
1 Parent(s): 9aac4d9

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -3
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
- st.title(np.argmax(cnn.predict(image1)))
 
115
 
116
- if canvas_result.json_data is not None:
117
- st.dataframe(pd.json_normalize(canvas_result.json_data["objects"]))
 
 
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"]))