Training the math model
draw_pad.py and app.py expect models/expr_model.pth (12 classes: 0-9, +, -).
Train it once with:
python retrain_robust.pyIt 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