Spaces:
Runtime error
Runtime error
Update app.py
Browse filesUpdate of search function so the tool uses __call__ method instead of search attribute, which causes error
app.py
CHANGED
|
@@ -21,7 +21,7 @@ def web_search(query: str, max_results: int = 3) -> str: #it's import to specify
|
|
| 21 |
search_tool = DuckDuckGoSearchTool()
|
| 22 |
|
| 23 |
# Perform the search
|
| 24 |
-
results = search_tool
|
| 25 |
|
| 26 |
# Format the results
|
| 27 |
formatted_results = []
|
|
|
|
| 21 |
search_tool = DuckDuckGoSearchTool()
|
| 22 |
|
| 23 |
# Perform the search
|
| 24 |
+
results = search_tool(query, max_results=max_results)
|
| 25 |
|
| 26 |
# Format the results
|
| 27 |
formatted_results = []
|