anup220799 commited on
Commit
cc538ec
·
verified ·
1 Parent(s): 0ddf489

Update app.py

Browse files

Add tools to CodeAgent

Files changed (1) hide show
  1. app.py +2 -3
app.py CHANGED
@@ -47,8 +47,7 @@ def get_current_time_in_timezone(timezone: str) -> str:
47
  return f"Error fetching time for timezone '{timezone}': {str(e)}"
48
 
49
 
50
- get_time_tool = get_current_time_in_timezone()
51
- convert_color_tool = convert_colorname_to_hex()
52
  final_answer = FinalAnswerTool()
53
 
54
  # 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:
@@ -70,7 +69,7 @@ with open("prompts.yaml", 'r') as stream:
70
 
71
  agent = CodeAgent(
72
  model=model,
73
- tools=[final_answer,convert_color_tool, get_time_tool], ## add your tools here (don't remove final answer)
74
  max_steps=6,
75
  verbosity_level=1,
76
  grammar=None,
 
47
  return f"Error fetching time for timezone '{timezone}': {str(e)}"
48
 
49
 
50
+
 
51
  final_answer = FinalAnswerTool()
52
 
53
  # 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
 
70
  agent = CodeAgent(
71
  model=model,
72
+ tools=[final_answer,convert_colorname_to_hex, get_current_time_in_timezone], ## add your tools here (don't remove final answer)
73
  max_steps=6,
74
  verbosity_level=1,
75
  grammar=None,