Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -3,7 +3,6 @@ import datetime
|
|
3 |
import requests
|
4 |
import pytz
|
5 |
import yaml
|
6 |
-
from duckduckgo_search import DDGS
|
7 |
from tools.final_answer import FinalAnswerTool
|
8 |
|
9 |
from Gradio_UI import GradioUI
|
@@ -34,18 +33,6 @@ def get_current_time_in_timezone(timezone: str) -> str:
|
|
34 |
except Exception as e:
|
35 |
return f"Error fetching time for timezone '{timezone}': {str(e)}"
|
36 |
|
37 |
-
# Web search tool using DuckDuckGo
|
38 |
-
@tool
|
39 |
-
def duckduckgo_search(query: str) -> list:
|
40 |
-
"""A tool that performs a search using the search engine DuckDuckGo and returns relevant results.
|
41 |
-
Args:
|
42 |
-
query: The search term or question to look up.
|
43 |
-
Returns:
|
44 |
-
A list of search results containing URLs and descriptions.
|
45 |
-
"""
|
46 |
-
search_tool = DuckDuckGoSearchTool()
|
47 |
-
results = search_tool(query)
|
48 |
-
return results
|
49 |
|
50 |
@tool
|
51 |
def mirror_user(happy: str) -> str:
|
|
|
3 |
import requests
|
4 |
import pytz
|
5 |
import yaml
|
|
|
6 |
from tools.final_answer import FinalAnswerTool
|
7 |
|
8 |
from Gradio_UI import GradioUI
|
|
|
33 |
except Exception as e:
|
34 |
return f"Error fetching time for timezone '{timezone}': {str(e)}"
|
35 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
36 |
|
37 |
@tool
|
38 |
def mirror_user(happy: str) -> str:
|