Update app.py
Browse files
app.py
CHANGED
|
@@ -5,7 +5,7 @@ import pytz
|
|
| 5 |
import yaml
|
| 6 |
from tools.final_answer import FinalAnswerTool
|
| 7 |
from tools.visit_webpage import VisitWebpageTool
|
| 8 |
-
from tools.web_shearch import DuckDuckGoSearchTool
|
| 9 |
from Gradio_UI import GradioUI
|
| 10 |
|
| 11 |
# Below is an example of a tool that does nothing. Amaze us with your creativity !
|
|
@@ -36,7 +36,7 @@ def get_current_time_in_timezone(timezone: str) -> str:
|
|
| 36 |
|
| 37 |
|
| 38 |
final_answer = FinalAnswerTool()
|
| 39 |
-
web_search=DuckDuckGoSearchTool()
|
| 40 |
visit_webpage=VisitWebpageTool()
|
| 41 |
|
| 42 |
# 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:
|
|
@@ -55,10 +55,12 @@ image_generation_tool = load_tool("agents-course/text-to-image", trust_remote_co
|
|
| 55 |
|
| 56 |
with open("prompts.yaml", 'r') as stream:
|
| 57 |
prompt_templates = yaml.safe_load(stream)
|
|
|
|
|
|
|
| 58 |
|
| 59 |
agent = CodeAgent(
|
| 60 |
model=model,
|
| 61 |
-
tools=[final_answer,
|
| 62 |
max_steps=6,
|
| 63 |
verbosity_level=1,
|
| 64 |
grammar=None,
|
|
|
|
| 5 |
import yaml
|
| 6 |
from tools.final_answer import FinalAnswerTool
|
| 7 |
from tools.visit_webpage import VisitWebpageTool
|
| 8 |
+
#from tools.web_shearch import DuckDuckGoSearchTool
|
| 9 |
from Gradio_UI import GradioUI
|
| 10 |
|
| 11 |
# Below is an example of a tool that does nothing. Amaze us with your creativity !
|
|
|
|
| 36 |
|
| 37 |
|
| 38 |
final_answer = FinalAnswerTool()
|
| 39 |
+
#web_search=DuckDuckGoSearchTool()
|
| 40 |
visit_webpage=VisitWebpageTool()
|
| 41 |
|
| 42 |
# 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:
|
|
|
|
| 55 |
|
| 56 |
with open("prompts.yaml", 'r') as stream:
|
| 57 |
prompt_templates = yaml.safe_load(stream)
|
| 58 |
+
|
| 59 |
+
#,web_search
|
| 60 |
|
| 61 |
agent = CodeAgent(
|
| 62 |
model=model,
|
| 63 |
+
tools=[final_answer,visit_webpage], ## add your tools here (don't remove final answer)
|
| 64 |
max_steps=6,
|
| 65 |
verbosity_level=1,
|
| 66 |
grammar=None,
|