Spaces:
Runtime error
Runtime error
Update agent.py
Browse files
agent.py
CHANGED
|
@@ -58,12 +58,12 @@ def find_answer(query: str) -> str:
|
|
| 58 |
if "Final answer :" in full_content:
|
| 59 |
# Extract everything after the first occurrence of “Final answer :”
|
| 60 |
answer_text = full_content.split("Final answer :", 1)[1].strip()
|
| 61 |
-
return
|
| 62 |
|
| 63 |
# Fallback if they used “Answer:” instead
|
| 64 |
if "Answer:" in full_content:
|
| 65 |
answer_text = full_content.split("Answer:", 1)[1].strip()
|
| 66 |
-
return
|
| 67 |
|
| 68 |
# If neither tag exists, just return whatever is after the last newline
|
| 69 |
# (or the entire text, but without the question prefix).
|
|
|
|
| 58 |
if "Final answer :" in full_content:
|
| 59 |
# Extract everything after the first occurrence of “Final answer :”
|
| 60 |
answer_text = full_content.split("Final answer :", 1)[1].strip()
|
| 61 |
+
return answer_text
|
| 62 |
|
| 63 |
# Fallback if they used “Answer:” instead
|
| 64 |
if "Answer:" in full_content:
|
| 65 |
answer_text = full_content.split("Answer:", 1)[1].strip()
|
| 66 |
+
return answer_text
|
| 67 |
|
| 68 |
# If neither tag exists, just return whatever is after the last newline
|
| 69 |
# (or the entire text, but without the question prefix).
|