How palliplease/flask-digit-recognizer works
This repository is a Flask web app for recognizing handwritten digits. A user uploads an image; the app preprocesses it for a trained LeNet-5 model, predicts a digit, and renders the result. The separate model script downloads MNIST, trains and evaluates the classifier, and saves model files. The README is empty; the map relies on the supplied source and file tree, and does not assume template behavior beyond its use by the routes.
Main entry points: app.py Flask routes · model.py Model training · main_pickle_save.pkl Pickled model · index.html Page template
Components 12
Web interface
- Flask routes
app.py - Page template
templates/index.html
Digit inference
- Image preprocessing
app.py - Digit prediction
app.py - Pickled model
main_pickle_save.pkl
Model training
- Data preparation
model.py - LeNet-5 definition
model.py - Model training
model.py - Model evaluation
model.py - HDF5 model
main_save.h5
Other components
- User
- MNIST dataset
Connections 15
- User → Flask routes: requests page
- Flask routes → Page template: renders page
- User → Flask routes: uploads image
- Flask routes → Image preprocessing: calls
- Flask routes → Pickled model: loads
- Flask routes → Digit prediction: calls
- Image preprocessing → Digit prediction: provides image
- Digit prediction → Pickled model: runs inference
- Flask routes → Page template: renders prediction
- MNIST dataset → Data preparation: loads dataset
- Data preparation → Model training: provides data
- LeNet-5 definition → Model training: builds model
- Model training → Model evaluation: evaluates
- Model training → HDF5 model: saves
- Model training → Pickled model: serializes