How maahmd/digit_project works
Digit_Project is a Streamlit handwritten-digit recognizer backed by a TensorFlow CNN. The main user workflow is drawing a digit, converting the canvas image to a normalized 28×28 input, running inference, and displaying the predicted digit, confidence, timing, and images. A separate training script loads and preprocesses MNIST, trains and evaluates the CNN, then saves a model file. The tree contains a weights file loaded by the app; the training script’s documented save filename differs, and the excerpts do not show how those artifacts are reconciled.
Main entry points: app.py CNN inference model · train_model.py CNN training · model_weights.weights.h5 Model weights
Components 11
Digit recognition
- Drawing canvas
app.py - Image preprocessing
app.py - CNN inference model
app.py - Model weights
model_weights.weights.h5 - Prediction display
app.py
Model training
- MNIST dataset
- Training preprocessing
train_model.py - CNN training
train_model.py - Model evaluation
train_model.py - Saved model file
train_model.py
Other components
- User
Connections 10
- User → Drawing canvas: draws digit
- Drawing canvas → Image preprocessing: image data
- Image preprocessing → CNN inference model: normalized input
- CNN inference model → Model weights: loads weights
- CNN inference model → Prediction display: prediction scores
- User → Prediction display: views result
- MNIST dataset → Training preprocessing: loads images
- Training preprocessing → CNN training: prepared data
- CNN training → Model evaluation: evaluates model
- CNN training → Saved model file: saves model