How gaiusparasa10-hash/mnist works
This repository is a Streamlit application for handwritten-digit recognition, backed by a trained MNIST CNN. The user draws a digit, requests prediction, and receives a digit and confidence score; Clear resets the canvas and displayed result. The app preprocesses the captured image before inference. A separate training script loads MNIST, trains and evaluates the CNN, and saves the model artifact used by the app. Edges are supported by the sampled app and training script, or by the README for documented behavior.
Main entry points: streamlit_app.py Predict and Clear · train_model.py Training Workflow · model.keras Trained Model
Components 13
Drawing and Results
- Drawing Canvas
streamlit_app.py - Predict and Clear
streamlit_app.py - Prediction Display
streamlit_app.py
Prediction Runtime
- Image Preprocessing
streamlit_app.py - Model Loader
streamlit_app.py - CNN Inference
streamlit_app.py - Trained Model
model.keras
Model Training
- Training Workflow
train_model.py - MNIST Dataset
- Training Data Prep
train_model.py - CNN Training
train_model.py - Model Evaluation
train_model.py
Other components
- User
Connections 14
- User → Drawing Canvas: draws on
README.md - Drawing Canvas → Predict and Clear: provides image
streamlit_app.py - User → Predict and Clear: requests prediction
README.md - Predict and Clear → Image Preprocessing: invokes
streamlit_app.py - Image Preprocessing → CNN Inference: provides tensor
streamlit_app.py - Model Loader → Trained Model: loads
streamlit_app.py - CNN Inference → Model Loader: uses loaded model
streamlit_app.py - CNN Inference → Prediction Display: stores prediction
streamlit_app.py - User → Predict and Clear: clears canvas
streamlit_app.py - Training Workflow → MNIST Dataset: loads dataset
train_model.py - Training Workflow → Training Data Prep: prepares data
train_model.py - Training Data Prep → CNN Training: provides training data
train_model.py - CNN Training → Model Evaluation: evaluates model
train_model.py - Training Workflow → Trained Model: saves model
train_model.py