Inference and Hub UX: shared predict_topk, atomic checkpoints, upload .env
Pablo Dejuan
179dfc2
- Add _ThreeHeadPredictMixin (predict_topk / predict_topk_from_path) on both
ResNet heads; Gradio uses it with predict_format top-k JSON and config
ImageNet normalize; device selection includes MPS.
- Add spot_check_excluded_post_impressionism.py (train transforms, --top-k)
and README spot-check table with GAP/Lin+He refs and BiLSTM wording.
- train_cnn: atomic torch.save via temp+replace; weights_only=False on loads;
clear error when last.pt is corrupt (suggest cp from best.pt).
- upload_model_to_hf: load .env with override=True; required --checkpoint;
default export to data/label_maps; drop --token; python-dotenv in
requirements; Dockerfile omits redundant --export-labels-dir.
- Tests for predict_topk, spot_check helpers, atomic save, dotenv override.
Made-with: Cursor
Add CNN-RNN model and Gradio demo
Pablo Dejuan
762e478
Made-with: Cursor
Add CNN training pipeline, src modules, tests, pytest and coverage