import torch examples = [ { 'name': 'lincoln.jpg', 'url': 'https://upload.wikimedia.org/wikipedia/commons/thumb/a/ab/Abraham_Lincoln_O-77_matte_collodion_print.jpg/1024px-Abraham_Lincoln_O-77_matte_collodion_print.jpg' }, { 'name': 'AI-generate.jpg', 'url': 'https://user-images.githubusercontent.com/17445847/187400315-87a90ac9-d231-45d6-b377-38702bd1838f.jpg' }, { 'name': 'Blake_Lively.jpg', 'url': 'https://user-images.githubusercontent.com/17445847/187400981-8a58f7a4-ef61-42d9-af80-bc6234cef860.jpg' }, { 'name': '10045.png', 'url': 'https://user-images.githubusercontent.com/17445847/187401133-8a3bf269-5b4d-4432-b2f0-6d26ee1d3307.png' } ] def download(): for example in examples: torch.hub.download_url_to_file(example['url'], example['name'])