Spaces:
Running
on
Zero
Running
on
Zero
Commit
·
bf79fdd
1
Parent(s):
541dc83
Fix: Think Tag split issue
Browse files
app.py
CHANGED
|
@@ -84,7 +84,13 @@ def transcript_qa(transcript, question, history):
|
|
| 84 |
|
| 85 |
# Remove thinking tags if present
|
| 86 |
if "<think>" in answer:
|
| 87 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 88 |
|
| 89 |
answer = answer.strip()
|
| 90 |
|
|
|
|
| 84 |
|
| 85 |
# Remove thinking tags if present
|
| 86 |
if "<think>" in answer:
|
| 87 |
+
if "</think>" in answer:
|
| 88 |
+
parts = answer.split("</think>")
|
| 89 |
+
if len(parts) > 1:
|
| 90 |
+
answer = parts[-1] # Get text after thinking
|
| 91 |
+
else:
|
| 92 |
+
# If no closing tag, try to get text after opening tag
|
| 93 |
+
answer = answer.split("<think>")[0] # Get text before thinking
|
| 94 |
|
| 95 |
answer = answer.strip()
|
| 96 |
|