Update app.py
Browse files
app.py
CHANGED
@@ -17,6 +17,7 @@ def my_cutom_tool(arg1:str, arg2:int)-> str: #it's import to specify the return
|
|
17 |
arg2: the second argument
|
18 |
"""
|
19 |
return "What magic will you build ?"
|
|
|
20 |
|
21 |
@tool
|
22 |
def get_current_time_in_timezone(timezone: str) -> str:
|
@@ -38,7 +39,7 @@ final_answer = FinalAnswerTool()
|
|
38 |
model = HfApiModel(
|
39 |
max_tokens=2096,
|
40 |
temperature=0.5,
|
41 |
-
model_id='
|
42 |
custom_role_conversions=None,
|
43 |
)
|
44 |
|
@@ -51,7 +52,7 @@ with open("prompts.yaml", 'r') as stream:
|
|
51 |
|
52 |
agent = CodeAgent(
|
53 |
model=model,
|
54 |
-
tools=[final_answer], ## add your tools here (don't remove final answer)
|
55 |
max_steps=6,
|
56 |
verbosity_level=1,
|
57 |
grammar=None,
|
|
|
17 |
arg2: the second argument
|
18 |
"""
|
19 |
return "What magic will you build ?"
|
20 |
+
|
21 |
|
22 |
@tool
|
23 |
def get_current_time_in_timezone(timezone: str) -> str:
|
|
|
39 |
model = HfApiModel(
|
40 |
max_tokens=2096,
|
41 |
temperature=0.5,
|
42 |
+
model_id='Qwen/Qwen2.5-Coder-32B-Instruct',# it is possible that this model may be overloaded
|
43 |
custom_role_conversions=None,
|
44 |
)
|
45 |
|
|
|
52 |
|
53 |
agent = CodeAgent(
|
54 |
model=model,
|
55 |
+
tools=[final_answer, image_generation_tool, get_current_time_in_timezone, DuckDuckGoSearchTool], ## add your tools here (don't remove final answer)
|
56 |
max_steps=6,
|
57 |
verbosity_level=1,
|
58 |
grammar=None,
|