A simple and elegant web application built using Flask that lets users upload an image of a handwritten Devanagari digit (0–9) and predicts the digit using a trained deep learning model.
- Upload image through a simple web interface
- Preprocessing of input using Pillow
- Deep Learning model (.h5) prediction with Keras
- Responsive Bootstrap 5 frontend
- Clean result display with image preview
devanagari_flask_app/
│
├── app.py # Flask backend
├── devanagari_digit_model.h5 # Trained CNN model (included in repo 😊)
├── static/
│ ├── uploads/ # Stores uploaded images
│ └── style.css # Custom styles (optional)
└── templates/
├── index.html # Upload form UI
└── result.html # Prediction result page
You can install all dependencies using pip:
pip install -r requirements.txtrequirements.txt
flask
tensorflow
numpy
pillow# Step 1: Clone the repo
git clone https://github.com/Bit-Nest/Devanagari-Digit-Recognition.git
cd devanagari-digit-recognition-flask
# Step 2: Make sure your model file is present
# Place your trained Keras .h5 model here:
# devanagari_digit_model.h5
# Step 3: Run the app
python app.pyThen open your browser and go to:
http://127.0.0.1:5000/
- Trained on a dataset of handwritten Devanagari digits (
digit_0todigit_9) - CNN-based architecture
- Input shape:
(64, 64, 3)
You can easily deploy this on:
This project is licensed under the MIT License.