Spaces:
Sleeping
Sleeping
Update app.py
Browse filesAdd tools to CodeAgent
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 |
-
|
| 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,
|
| 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,
|