Spaces:
Sleeping
Sleeping
End-to-end MNIST handwritten digit recognition using a CNN, with a Flask web app featuring real-time canvas-based predictions.
f7da636 verified | from flask import Flask | |
| import tensorflow as tf | |
| import os | |
| BASE_DIR = os.path.dirname(os.path.abspath(__file__)) | |
| app = Flask( | |
| __name__, | |
| template_folder=os.path.join(BASE_DIR, "templates"), | |
| static_folder=os.path.join(BASE_DIR, "static") | |
| ) | |
| # Load model ONCE | |
| model = tf.keras.models.load_model('model/cnn_model.keras') | |
| from app import routes | |