WeByT3 commited on
Commit
08af3b9
·
verified ·
1 Parent(s): 5a322a3

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -23,8 +23,8 @@ class BasicAgent:
23
  final_answer = self.agent.invoke({"messages": question})
24
  print(f"Agent returning fixed answer: {final_answer}")
25
  text = final_answer["messages"][-1].content
26
- if "FINAL ANSWER: " in text:
27
- return text.partition("FINAL ANSWER: ")[2].strip()
28
  return text.strip()
29
 
30
  def run_and_submit_all( profile: gr.OAuthProfile | None):
 
23
  final_answer = self.agent.invoke({"messages": question})
24
  print(f"Agent returning fixed answer: {final_answer}")
25
  text = final_answer["messages"][-1].content
26
+ if "FINAL ANSWER:" in text:
27
+ return text.partition("FINAL ANSWER:")[2].strip()
28
  return text.strip()
29
 
30
  def run_and_submit_all( profile: gr.OAuthProfile | None):