M96820 commited on
Commit
2e39bf9
·
unverified ·
1 Parent(s): 7ce893b

feat: add user_input tool

Browse files
Files changed (1) hide show
  1. app.py +3 -1
app.py CHANGED
@@ -6,6 +6,7 @@ import requests
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
 
@@ -62,6 +63,7 @@ def get_current_time_in_timezone(timezone: str) -> str:
62
 
63
 
64
  final_answer = FinalAnswerTool()
 
65
 
66
  # 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:
67
  # model_id='https://pflgm2locj2t89co.us-east-1.aws.endpoints.huggingface.cloud'
@@ -82,7 +84,7 @@ with open("prompts.yaml", "r") as stream:
82
 
83
  agent = CodeAgent(
84
  model=model,
85
- tools=[final_answer], ## add your tools here (don't remove final answer)
86
  max_steps=6,
87
  verbosity_level=1,
88
  grammar=None,
 
6
  from tools.final_answer import FinalAnswerTool
7
  from tools.web_search import DuckDuckGoSearchTool
8
  from tools.visit_webpage import VisitWebpageTool
9
+ import smolagents.UserInputTool as UserInputTool
10
 
11
  from Gradio_UI import GradioUI
12
 
 
63
 
64
 
65
  final_answer = FinalAnswerTool()
66
+ user_input = UserInputTool()
67
 
68
  # 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:
69
  # model_id='https://pflgm2locj2t89co.us-east-1.aws.endpoints.huggingface.cloud'
 
84
 
85
  agent = CodeAgent(
86
  model=model,
87
+ tools=[final_answer, user_input, search_arxiv], ## add your tools here (don't remove final answer)
88
  max_steps=6,
89
  verbosity_level=1,
90
  grammar=None,