razvan-horobeanu commited on
Commit
2db2743
·
verified ·
1 Parent(s): 0902f67

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -27,7 +27,7 @@ visit_webpage = VisitWebpage()
27
  with open(os.path.join(CURRENT_DIR, "prompts.yaml"), 'r') as stream:
28
  prompt_templates = yaml.safe_load(stream)
29
 
30
- agent = CodeAgent(
31
  model=model,
32
  tools=[web_search, visit_webpage],
33
  max_steps=10,
@@ -44,7 +44,7 @@ class BasicAgent():
44
  print("BasicAgent initialized.")
45
  def __call__(self, question: str) -> str:
46
  print(f"Agent received question (first 50 chars): {question[:50]}...")
47
- fixed_answer = agent.run(question)
48
  print(f"Agent returning fixed answer: {fixed_answer}")
49
  return fixed_answer
50
 
 
27
  with open(os.path.join(CURRENT_DIR, "prompts.yaml"), 'r') as stream:
28
  prompt_templates = yaml.safe_load(stream)
29
 
30
+ agent_init = CodeAgent(
31
  model=model,
32
  tools=[web_search, visit_webpage],
33
  max_steps=10,
 
44
  print("BasicAgent initialized.")
45
  def __call__(self, question: str) -> str:
46
  print(f"Agent received question (first 50 chars): {question[:50]}...")
47
+ fixed_answer = agent_init.run(question)
48
  print(f"Agent returning fixed answer: {fixed_answer}")
49
  return fixed_answer
50