MasterOfHugs commited on
Commit
2e96732
·
verified ·
1 Parent(s): 937f42b

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -1,5 +1,5 @@
1
  # app.py
2
- from smolagents import CodeAgent, HfApiModel, tool
3
  from tools.final_answer import FinalAnswerTool
4
  from tools.web_search import DuckDuckGoSearchTool # 👈 ajout
5
  from tools.visit_webpage import VisitWebpageTool # 👈 ajout
@@ -23,12 +23,12 @@ agent = CodeAgent(
23
  )
24
 
25
  # Exemple d'outils custom existants
26
- @tool
27
  def my_custom_tool() -> str:
28
  """This is a custom tool."""
29
  return "This is my custom tool!"
30
 
31
- @tool
32
  def get_current_time_in_timezone(timezone: str) -> str:
33
  """Get the current time in a given timezone."""
34
  from datetime import datetime
 
1
  # app.py
2
+ from smolagents import CodeAgent, HfApiModel, Tool
3
  from tools.final_answer import FinalAnswerTool
4
  from tools.web_search import DuckDuckGoSearchTool # 👈 ajout
5
  from tools.visit_webpage import VisitWebpageTool # 👈 ajout
 
23
  )
24
 
25
  # Exemple d'outils custom existants
26
+ @Tool
27
  def my_custom_tool() -> str:
28
  """This is a custom tool."""
29
  return "This is my custom tool!"
30
 
31
+ @Tool
32
  def get_current_time_in_timezone(timezone: str) -> str:
33
  """Get the current time in a given timezone."""
34
  from datetime import datetime