Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -1,4 +1,4 @@
|
|
1 |
-
from smolagents import CodeAgent,DuckDuckGoSearchTool, HfApiModel,load_tool,tool
|
2 |
import datetime
|
3 |
import requests
|
4 |
import pytz
|
@@ -44,6 +44,8 @@ def get_current_time_in_timezone(timezone: str) -> str:
|
|
44 |
|
45 |
|
46 |
final_answer = FinalAnswerTool()
|
|
|
|
|
47 |
|
48 |
# 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:
|
49 |
model_id='https://pflgm2locj2t89co.us-east-1.aws.endpoints.huggingface.cloud'
|
@@ -65,7 +67,14 @@ with open("prompts.yaml", 'r') as stream:
|
|
65 |
|
66 |
agent = CodeAgent(
|
67 |
model=model,
|
68 |
-
tools=[
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
69 |
max_steps=6,
|
70 |
verbosity_level=1,
|
71 |
grammar=None,
|
|
|
1 |
+
from smolagents import CodeAgent, DuckDuckGoSearchTool, VisitWebpageTool, HfApiModel,load_tool,tool
|
2 |
import datetime
|
3 |
import requests
|
4 |
import pytz
|
|
|
44 |
|
45 |
|
46 |
final_answer = FinalAnswerTool()
|
47 |
+
duck_duck_go = DuckDuckGoSearchTool()
|
48 |
+
visit_web_page = VisitWebpageTool()
|
49 |
|
50 |
# 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:
|
51 |
model_id='https://pflgm2locj2t89co.us-east-1.aws.endpoints.huggingface.cloud'
|
|
|
67 |
|
68 |
agent = CodeAgent(
|
69 |
model=model,
|
70 |
+
tools=[
|
71 |
+
final_answer,
|
72 |
+
duck_duck_go,
|
73 |
+
visit_web_page,
|
74 |
+
my_custom_tool,
|
75 |
+
get_current_time_in_timezone,
|
76 |
+
calculator
|
77 |
+
],
|
78 |
max_steps=6,
|
79 |
verbosity_level=1,
|
80 |
grammar=None,
|