Spaces:
Runtime error
Runtime error
JK commited on
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 |
|
| 9 |
from Gradio_UI import GradioUI
|
|
@@ -41,6 +43,8 @@ def get_current_time_in_timezone(timezone: str) -> str:
|
|
| 41 |
|
| 42 |
|
| 43 |
final_answer = FinalAnswerTool()
|
|
|
|
|
|
|
| 44 |
|
| 45 |
# 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:
|
| 46 |
# model_id='https://pflgm2locj2t89co.us-east-1.aws.endpoints.huggingface.cloud'
|
|
@@ -61,7 +65,7 @@ with open("prompts.yaml", 'r') as stream:
|
|
| 61 |
|
| 62 |
agent = CodeAgent(
|
| 63 |
model=model,
|
| 64 |
-
tools=[final_answer, image_generation_tool], ## add your tools here (don't remove final answer)
|
| 65 |
max_steps=6,
|
| 66 |
verbosity_level=1,
|
| 67 |
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.websearch import DuckDuckGoSearchTool
|
| 9 |
|
| 10 |
|
| 11 |
from Gradio_UI import GradioUI
|
|
|
|
| 43 |
|
| 44 |
|
| 45 |
final_answer = FinalAnswerTool()
|
| 46 |
+
web_page = VisitWebpageTool()
|
| 47 |
+
duck_duck = DuckDuckGoSearchTool()
|
| 48 |
|
| 49 |
# 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:
|
| 50 |
# model_id='https://pflgm2locj2t89co.us-east-1.aws.endpoints.huggingface.cloud'
|
|
|
|
| 65 |
|
| 66 |
agent = CodeAgent(
|
| 67 |
model=model,
|
| 68 |
+
tools=[final_answer, image_generation_tool, web_page, duck_duck, get_current_time_in_timezone], ## add your tools here (don't remove final answer)
|
| 69 |
max_steps=6,
|
| 70 |
verbosity_level=1,
|
| 71 |
grammar=None,
|