LavleshJ commited on
Commit
b2a8fda
·
verified ·
1 Parent(s): 00d0189

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -1
app.py CHANGED
@@ -16,6 +16,8 @@ class BasicAgent:
16
  def __init__(self):
17
  self.model = HfApiModel(max_tokens=2096, temperature=0.5, model_id='Qwen/Qwen2.5-Coder-32B-Instruct', custom_role_conversions=None,)
18
  # CodeAgent allows the model to use a python interpreter to solve complex problems
 
 
19
  self.agent = CodeAgent(
20
  model=self.model,
21
  tools=[], ## add your tools here (don't remove final answer)
@@ -25,7 +27,7 @@ class BasicAgent:
25
  planning_interval=None,
26
  name=None,
27
  description=None,
28
- prompt_templates=prompt_templates
29
  )
30
  print("Smolagents CodeAgent initialized.")
31
 
 
16
  def __init__(self):
17
  self.model = HfApiModel(max_tokens=2096, temperature=0.5, model_id='Qwen/Qwen2.5-Coder-32B-Instruct', custom_role_conversions=None,)
18
  # CodeAgent allows the model to use a python interpreter to solve complex problems
19
+ with open("prompts.yaml", 'r') as stream:
20
+ self.prompt_templates = yaml.safe_load(stream)
21
  self.agent = CodeAgent(
22
  model=self.model,
23
  tools=[], ## add your tools here (don't remove final answer)
 
27
  planning_interval=None,
28
  name=None,
29
  description=None,
30
+ prompt_templates=self.prompt_templates
31
  )
32
  print("Smolagents CodeAgent initialized.")
33