Spaces:
Runtime error
Runtime error
Commit
·
6a2015d
1
Parent(s):
0576ce3
fixed treatment input code
Browse files
app.py
CHANGED
|
@@ -65,16 +65,10 @@ print(
|
|
| 65 |
# === Role Agent with instruction/input/output format ===
|
| 66 |
class RoleAgent:
|
| 67 |
def __init__(self, role_instruction, tokenizer, model):
|
| 68 |
-
format_instr = (
|
| 69 |
-
"When you respond, ALWAYS use exactly two sections:\n"
|
| 70 |
-
"THINKING: <your detailed reasoning>\n"
|
| 71 |
-
"ANSWER: <your concise final output>\n"
|
| 72 |
-
"Do NOT output anything else.\n\n"
|
| 73 |
-
)
|
| 74 |
|
| 75 |
self.tokenizer = tokenizer
|
| 76 |
self.model = model
|
| 77 |
-
self.role_instruction = role_instruction
|
| 78 |
|
| 79 |
def act(self, input_text):
|
| 80 |
prompt = (
|
|
|
|
| 65 |
# === Role Agent with instruction/input/output format ===
|
| 66 |
class RoleAgent:
|
| 67 |
def __init__(self, role_instruction, tokenizer, model):
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 68 |
|
| 69 |
self.tokenizer = tokenizer
|
| 70 |
self.model = model
|
| 71 |
+
self.role_instruction = role_instruction
|
| 72 |
|
| 73 |
def act(self, input_text):
|
| 74 |
prompt = (
|