Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -7,13 +7,16 @@ from tools.final_answer import FinalAnswerTool
|
|
| 7 |
|
| 8 |
from Gradio_UI import GradioUI
|
| 9 |
|
|
|
|
|
|
|
| 10 |
@tool
|
| 11 |
def search_web(query:str)-> str:
|
| 12 |
"""A tool that runs a DuckDuckGo search and returns a formatted result.
|
| 13 |
Args:
|
| 14 |
query: A string representing the query to search for.
|
| 15 |
"""
|
| 16 |
-
|
|
|
|
| 17 |
|
| 18 |
@tool
|
| 19 |
def get_current_time_in_timezone(timezone: str) -> str:
|
|
|
|
| 7 |
|
| 8 |
from Gradio_UI import GradioUI
|
| 9 |
|
| 10 |
+
ddg = DuckDuckGoSearchTool(max_results=5)
|
| 11 |
+
|
| 12 |
@tool
|
| 13 |
def search_web(query:str)-> str:
|
| 14 |
"""A tool that runs a DuckDuckGo search and returns a formatted result.
|
| 15 |
Args:
|
| 16 |
query: A string representing the query to search for.
|
| 17 |
"""
|
| 18 |
+
results = ddg.run(query)
|
| 19 |
+
return results
|
| 20 |
|
| 21 |
@tool
|
| 22 |
def get_current_time_in_timezone(timezone: str) -> str:
|