in distilvit/pexels.py [0:0]
def fetch_pexels():
queries = ["animals", "nudes", "smoking", "group", "war"]
with ThreadPoolExecutor(max_workers=5) as executor:
futures = [executor.submit(fetch_images, query) for query in queries]
for future in as_completed(futures):
try:
future.result()
except Exception as exc:
print(f"Generated an exception: {exc}")