Spaces:
Sleeping
Sleeping
add tool webpage
Browse files
app.py
CHANGED
@@ -5,6 +5,7 @@ import pytz
|
|
5 |
import yaml
|
6 |
from tools.final_answer import FinalAnswerTool
|
7 |
from tools.web_search import DuckDuckGoSearchTool
|
|
|
8 |
|
9 |
from Gradio_UI import GradioUI
|
10 |
|
@@ -35,6 +36,7 @@ def get_current_time_in_timezone(timezone: str) -> str:
|
|
35 |
return f"Error fetching time for timezone '{timezone}': {str(e)}"
|
36 |
|
37 |
|
|
|
38 |
search = DuckDuckGoSearchTool()
|
39 |
final_answer = FinalAnswerTool()
|
40 |
|
@@ -58,7 +60,7 @@ with open("prompts.yaml", 'r') as stream:
|
|
58 |
|
59 |
agent = CodeAgent(
|
60 |
model=model,
|
61 |
-
tools=[
|
62 |
max_steps=6,
|
63 |
verbosity_level=1,
|
64 |
grammar=None,
|
|
|
5 |
import yaml
|
6 |
from tools.final_answer import FinalAnswerTool
|
7 |
from tools.web_search import DuckDuckGoSearchTool
|
8 |
+
from tools.visit_webpage import VisitWebpageTool
|
9 |
|
10 |
from Gradio_UI import GradioUI
|
11 |
|
|
|
36 |
return f"Error fetching time for timezone '{timezone}': {str(e)}"
|
37 |
|
38 |
|
39 |
+
webpage = VisitWebpageTool()
|
40 |
search = DuckDuckGoSearchTool()
|
41 |
final_answer = FinalAnswerTool()
|
42 |
|
|
|
60 |
|
61 |
agent = CodeAgent(
|
62 |
model=model,
|
63 |
+
tools=[webpage,final_answer], ## add your tools here (don't remove final answer)
|
64 |
max_steps=6,
|
65 |
verbosity_level=1,
|
66 |
grammar=None,
|