antonioschiro commited on
Commit
4f60aa3
·
verified ·
1 Parent(s): 4ba071b

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -1
app.py CHANGED
@@ -28,7 +28,9 @@ class BasicAgent:
28
  try:
29
  response = response.content
30
  matches = re.findall(r"Final Answer:\s*(.*)", response)
31
- return matches[-1].strip() if matches else response.strip()
 
 
32
  except:
33
  return "Sorry, I can't answer to this question."
34
 
 
28
  try:
29
  response = response.content
30
  matches = re.findall(r"Final Answer:\s*(.*)", response)
31
+ if matches:
32
+ return matches[-1].strip()
33
+ return response.strip()
34
  except:
35
  return "Sorry, I can't answer to this question."
36