Spaces:
Build error
Build error
Download utils.py from HamzaNaser/HandWrittenDigits: direct link, hf CLI and curl.
- Browser
- Download file 189 Bytes
-
https://huggingface.co/spaces/HamzaNaser/HandWrittenDigits/resolve/main/utils.py
- Command line
-
hf download hf://spaces/HamzaNaser/HandWrittenDigits/utils.py
-
curl -L -o utils.py https://huggingface.co/spaces/HamzaNaser/HandWrittenDigits/resolve/main/utils.py
189 Bytes
| import torch | |
| def save_model(model,path,MODEL_NAME): | |
| MODEL_NAME = MODEL_NAME + '.pth' | |
| SAVED_MODEL_PATH = path / 'Models' / MODEL_NAME | |
| torch.save(model,f=SAVED_MODEL_PATH) | |