Recognizing handwritten digits in realtime

I trained a simple model to recognize handwritten digits using TensorFlow's Python API and the mnist data set. I then used TensorFlow's Javascript API to run the model in the browser.

To test it, you can draw a digit on the canvas below and see the model's realtime predictions on the right. If you see a bad prediction, you can record it by clicking the number that the model should have predicted. The data from the image, the prediction, and the button you pressed will be saved via PubHub's messaging API. I can then retrain the model using the recorded mistaken predictions in order to improve it.

See the architecture of the model here, and the full code for this project is here.

Prediction:

0
0
0
0
0
0
0
0
0
0