Download test.py from mmichiels13/Agents_Course_Final_Assignment: direct link, hf CLI and curl.
- Browser
- Download file 468 Bytes
-
https://huggingface.co/spaces/mmichiels13/Agents_Course_Final_Assignment/resolve/main/test.py
- Command line
-
hf download hf://spaces/mmichiels13/Agents_Course_Final_Assignment/test.py
-
curl -L -o test.py https://huggingface.co/spaces/mmichiels13/Agents_Course_Final_Assignment/resolve/main/test.py
468 Bytes
| # test_search.py | |
| from smolagents import DuckDuckGoSearchTool | |
| def test_search(): | |
| print("Testing DuckDuckGo search functionality...") | |
| try: | |
| search_tool = DuckDuckGoSearchTool() | |
| result = search_tool("Python programming language") | |
| print(f"Search successful! Found: {result[:150]}...") | |
| return True | |
| except Exception as e: | |
| print(f"Search failed: {e}") | |
| return False | |
| if __name__ == "__main__": | |
| test_search() |