Spaces:
Sleeping
Sleeping
Update app.py
Browse filesModifed approach to calling DuckDuckGoSearchTool
app.py
CHANGED
@@ -25,8 +25,9 @@ def get_web_search_results(query: str)-> str: #it's import to specify the return
|
|
25 |
Args:
|
26 |
query: A string representing a valid web query. IMPORTANT: Follow type str format strictly e.g. 'pictures of cats'.
|
27 |
"""
|
|
|
28 |
try:
|
29 |
-
results =
|
30 |
if results and results != "None":
|
31 |
return results
|
32 |
else:
|
|
|
25 |
Args:
|
26 |
query: A string representing a valid web query. IMPORTANT: Follow type str format strictly e.g. 'pictures of cats'.
|
27 |
"""
|
28 |
+
search_results_tool = DuckDuckGoSearchTool()
|
29 |
try:
|
30 |
+
results = search_results_tool(query)
|
31 |
if results and results != "None":
|
32 |
return results
|
33 |
else:
|