Spaces:
Sleeping
Sleeping
Update app.py
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 |
|
@@ -59,6 +61,8 @@ def simple_calculator(a: float, b: float, operation: str) -> float:
|
|
59 |
|
60 |
|
61 |
final_answer = FinalAnswerTool()
|
|
|
|
|
62 |
|
63 |
# If the agent does not answer, the model is overloaded, please use another model or the following Hugging Face Endpoint that also contains qwen2.5 coder:
|
64 |
# model_id='https://pflgm2locj2t89co.us-east-1.aws.endpoints.huggingface.cloud'
|
@@ -79,7 +83,7 @@ with open("prompts.yaml", 'r') as stream:
|
|
79 |
|
80 |
agent = CodeAgent(
|
81 |
model=model,
|
82 |
-
tools=[final_answer, get_current_time_in_timezone, simple_calculator], ## add your tools here (don't remove final answer)
|
83 |
max_steps=6,
|
84 |
verbosity_level=1,
|
85 |
grammar=None,
|
|
|
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 |
|
|
|
61 |
|
62 |
|
63 |
final_answer = FinalAnswerTool()
|
64 |
+
visit_webpage = VisitWebpageTool()
|
65 |
+
duckduckgo_search = DuckDuckGoSearchTool()
|
66 |
|
67 |
# If the agent does not answer, the model is overloaded, please use another model or the following Hugging Face Endpoint that also contains qwen2.5 coder:
|
68 |
# model_id='https://pflgm2locj2t89co.us-east-1.aws.endpoints.huggingface.cloud'
|
|
|
83 |
|
84 |
agent = CodeAgent(
|
85 |
model=model,
|
86 |
+
tools=[final_answer, get_current_time_in_timezone, simple_calculator, duckduckgo_search, visit_webpage, image_generation_tool], ## add your tools here (don't remove final answer)
|
87 |
max_steps=6,
|
88 |
verbosity_level=1,
|
89 |
grammar=None,
|