# Training the math model

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

```bash
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).