dineshbarri/Neural_Digit_Recognizer — reverse-engineered prompt
Reverse engineered prompt
Build me a simple web app that can recognize handwritten digits. I want a clean page where someone can draw a number from 0 to 9 on a canvas, click predict, and immediately see what the model thinks it is. Also let users upload an image of a handwritten digit and get the same result.
Use a PyTorch CNN trained on MNIST, with a Flask backend serving the page and prediction endpoint. Include the image cleanup needed so drawings and uploads work well, like resizing, grayscale conversion, normalizing, and handling inverted colors. Show the best prediction clearly, plus the top three guesses with confidence percentages.
Please include a training script that can retrain the model and save the weights, plus basic training and validation metrics and a confusion matrix file. Make the UI modern, responsive, and easy to use on desktop or phone. Add Docker support and simple run instructions so I can launch it locally or deploy it later.
Want more depth? Deep Reverse