Qentrah
Projects
Guides

Training the math model

View as Markdown

draw_pad.py and app.py expect models/expr_model.pth (12 classes: 0-9, +, -). Train it once with:

Terminal
Shell
python retrain_robust.py

It trains on MNIST augmented with rotated/translated samples plus hand-written-style rendered digits and +/- operators, so it survives real handwriting (including confused-looking 0/6/9/3/8).

Source captured: 2026-10-11