Spaces:
Sleeping
Sleeping
add web search tool
Browse files
app.py
CHANGED
|
@@ -4,6 +4,8 @@ import requests
|
|
| 4 |
import pytz
|
| 5 |
import yaml
|
| 6 |
from tools.final_answer import FinalAnswerTool
|
|
|
|
|
|
|
| 7 |
|
| 8 |
from Gradio_UI import GradioUI
|
| 9 |
|
|
@@ -33,6 +35,8 @@ def get_current_time_in_timezone(timezone: str) -> str:
|
|
| 33 |
except Exception as e:
|
| 34 |
return f"Error fetching time for timezone '{timezone}': {str(e)}"
|
| 35 |
|
|
|
|
|
|
|
| 36 |
|
| 37 |
final_answer = FinalAnswerTool()
|
| 38 |
model = HfApiModel(
|
|
|
|
| 4 |
import pytz
|
| 5 |
import yaml
|
| 6 |
from tools.final_answer import FinalAnswerTool
|
| 7 |
+
from tools.visit_webpage import VisitWebpageTool
|
| 8 |
+
from tools.web_search import DuckDuckGoSearchTool
|
| 9 |
|
| 10 |
from Gradio_UI import GradioUI
|
| 11 |
|
|
|
|
| 35 |
except Exception as e:
|
| 36 |
return f"Error fetching time for timezone '{timezone}': {str(e)}"
|
| 37 |
|
| 38 |
+
visit_webpage = VisitWebpageTool()
|
| 39 |
+
web_search = DuckDuckGoSearchTool()
|
| 40 |
|
| 41 |
final_answer = FinalAnswerTool()
|
| 42 |
model = HfApiModel(
|