lcapriles commited on
Commit
fa237f3
·
verified ·
1 Parent(s): b2b1bc0
Files changed (1) hide show
  1. app.py +21 -6
app.py CHANGED
@@ -24,12 +24,27 @@ def suggest_menu(occasion: str) -> str:
24
  else:
25
  return "Custom menu for the butler."
26
 
27
- # Alfred, the butler, preparing the playlist for the party
28
- agent = CodeAgent(tools=[DuckDuckGoSearchTool()], model=HfApiModel())
29
- agent.run("Search for the best music recommendations for a party at the Wayne's mansion.")
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
30
 
31
- # Alfred, the butler, preparing the menu for the party
32
- agent = CodeAgent(tools=[suggest_menu], model=HfApiModel())
33
- agent.run("Prepare a formal menu for the party.")
34
 
35
  GradioUI(agent).launch()
 
24
  else:
25
  return "Custom menu for the butler."
26
 
27
+ model = HfApiModel(
28
+ max_tokens=2096,
29
+ temperature=0.5,
30
+ model_id='Qwen/Qwen2.5-Coder-32B-Instruct',# it is possible that this model may be overloaded
31
+ custom_role_conversions=None,
32
+ )
33
+
34
+ with open("prompts.yaml", 'r') as stream:
35
+ prompt_templates = yaml.safe_load(stream)
36
+
37
+ agent = CodeAgent(
38
+ model=model,
39
+ tools=[get_current_time_in_timezone,final_answer], ## add your tools here (don't remove final answer)
40
+ max_steps=6,
41
+ verbosity_level=1,
42
+ grammar=None,
43
+ planning_interval=None,
44
+ name=None,
45
+ description=None,
46
+ prompt_templates=prompt_templates
47
+ )
48
 
 
 
 
49
 
50
  GradioUI(agent).launch()