Spaces:
Build error
Build error
Download examples.py from freeapp5678/GFPGAN: direct link, hf CLI and curl.
- Browser
- Download file 672 Bytes
-
https://huggingface.co/spaces/freeapp5678/GFPGAN/resolve/main/examples.py
- Command line
-
hf download hf://spaces/freeapp5678/GFPGAN/examples.py
-
curl -L -o examples.py https://huggingface.co/spaces/freeapp5678/GFPGAN/resolve/main/examples.py
672 Bytes
| import torch | |
| examples = [ | |
| { | |
| 'name': 'lincoln.jpg', | |
| 'url': 'https://cdn.britannica.com/09/149309-050-8859A04A/Abraham-Lincoln-photograph-Mathew-Brady-1864.jpg' | |
| }, | |
| { | |
| 'name': 'taylor_momsen.jpg', | |
| 'url': 'https://ts4.tc.mm.bing.net/th/id/OIP-C.2O41IrNLVYJ3l8H1XhDOfgHaLH?cb=defcache2defcache=1&rs=1&pid=ImgDetMain&o=7&rm=3' | |
| }, | |
| { | |
| 'name': 'leonardo.jpg', | |
| 'url': 'https://ts4.tc.mm.bing.net/th/id/OIP-C.Z_FHUynw1vRHk6dLbwr05gAAAA?cb=defcache2defcache=1&rs=1&pid=ImgDetMain&o=7&rm=3' | |
| } | |
| ] | |
| def download(): | |
| for example in examples: | |
| torch.hub.download_url_to_file(example['url'], example['name']) | |