The search_images function in the first notebook does not work neither for me nor many other users (see notebook comments). I tracked this down to an issue with the duckduckgo_search library. According to this (thread)[https://github.com/deedy5/duckduckgo_search/issues/136], the following code solves the problem. I tried it out and indeed, I can run the notebook without any problems.
from duckduckgo_search import DDGS
from fastcore.foundation import L
def search_images(term, max_images=30):
print(f"Searching for '{term}'")
with DDGS(headers = {"Accept-Encoding": "gzip, deflate, br"}) as ddgs:
results = ddgs.images(keywords=term)
return L(results).itemgot('image')
The
search_images
function in the first notebook does not work neither for me nor many other users (see notebook comments). I tracked this down to an issue with the duckduckgo_search library. According to this (thread)[https://github.com/deedy5/duckduckgo_search/issues/136], the following code solves the problem. I tried it out and indeed, I can run the notebook without any problems.