Update app.py
Browse files
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 |
-
|
|
|
|
|
|
|
| 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 |
|