DuckDuckGo search error when using FastAPI's pip version
I've been trying to get images from duckduckgo using: from duckduckgo_search import DDGS from fastcore.all import * ddgs = DDGS() def search_images(term, max_images=30): print(f"Searching for '{term}'") keywords = 'stop sign' return L(ddgs.images((keywords, term, max_results=max_images)).itemgot('image')) but it gives an error: Cell In[30], line 8 return L(ddgs.images((keywords, term, max_results=max_images)).itemgot('image')) ^ SyntaxError: invalid syntax. Maybe you meant '==' or ':=' instead of '='? Did some looking up and seems there's some issue with the pip version of fastbook-0.0.16.tar.
0 upvotes
View original discussion ↗
Comments
Sign in or sign up to comment and upvote.
No comments yet.