Spaces:
Runtime error
Runtime error
Commit
·
5d7bd20
1
Parent(s):
d0726f5
added debugging sequence to fix outputs
Browse files
app.py
CHANGED
|
@@ -39,6 +39,7 @@ tokenizer = AutoTokenizer.from_pretrained(
|
|
| 39 |
print("[DEBUG] Loaded fast tokenizer object:", tokenizer, "type:", type(tokenizer))
|
| 40 |
# Confirm tokenizer files are present
|
| 41 |
import os
|
|
|
|
| 42 |
print("[DEBUG] Files in MODEL_DIR for tokenizer:", os.listdir(MODEL_DIR))
|
| 43 |
# Inspect tokenizer's initialization arguments
|
| 44 |
try:
|
|
@@ -93,6 +94,7 @@ class RoleAgent:
|
|
| 93 |
thinking = ""
|
| 94 |
answer = response
|
| 95 |
if all(tag in response for tag in ("THINKING:", "ANSWER:", "END")):
|
|
|
|
| 96 |
block = response.split("THINKING:")[1].split("END")[0]
|
| 97 |
thinking = block.split("ANSWER:")[0].strip()
|
| 98 |
answer = block.split("ANSWER:")[1].strip()
|
|
|
|
| 39 |
print("[DEBUG] Loaded fast tokenizer object:", tokenizer, "type:", type(tokenizer))
|
| 40 |
# Confirm tokenizer files are present
|
| 41 |
import os
|
| 42 |
+
|
| 43 |
print("[DEBUG] Files in MODEL_DIR for tokenizer:", os.listdir(MODEL_DIR))
|
| 44 |
# Inspect tokenizer's initialization arguments
|
| 45 |
try:
|
|
|
|
| 94 |
thinking = ""
|
| 95 |
answer = response
|
| 96 |
if all(tag in response for tag in ("THINKING:", "ANSWER:", "END")):
|
| 97 |
+
print("[FIX] response:", response)
|
| 98 |
block = response.split("THINKING:")[1].split("END")[0]
|
| 99 |
thinking = block.split("ANSWER:")[0].strip()
|
| 100 |
answer = block.split("ANSWER:")[1].strip()
|