Spaces:
Sleeping
Sleeping
Download tests/search_test.py from Samagra07/LinkedIn-Post-Generator: direct link, hf CLI and curl.
- Browser
- Download file 313 Bytes
-
https://huggingface.co/spaces/Samagra07/LinkedIn-Post-Generator/resolve/main/tests/search_test.py
- Command line
-
hf download hf://spaces/Samagra07/LinkedIn-Post-Generator/tests/search_test.py
-
curl -L -o search_test.py https://huggingface.co/spaces/Samagra07/LinkedIn-Post-Generator/resolve/main/tests/search_test.py
313 Bytes
| from langchain_community.tools import DuckDuckGoSearchRun | |
| from langchain_community.utilities import DuckDuckGoSearchAPIWrapper | |
| wrapper = DuckDuckGoSearchAPIWrapper(max_results=25) | |
| web_search_tool = DuckDuckGoSearchRun(api_wrapper=wrapper) | |
| rep = web_search_tool.invoke("Who won 2025 Champions Trophy") | |
| print(rep) |