Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
@@ -62,10 +62,10 @@ def predict(message, history, system_prompt, temperature, max_new_tokens, top_k,
|
|
62 |
# instruction += f'<|im_start|>user\n{message}\n<|im_end|>\n<|im_start|>assistant\n'
|
63 |
|
64 |
stop_tokens = ["<|endoftext|>", "<|im_end|>"]
|
65 |
-
instruction = '
|
66 |
for user, assistant in history:
|
67 |
-
instruction += f'
|
68 |
-
instruction += f'
|
69 |
|
70 |
print(instruction)
|
71 |
|
|
|
62 |
# instruction += f'<|im_start|>user\n{message}\n<|im_end|>\n<|im_start|>assistant\n'
|
63 |
|
64 |
stop_tokens = ["<|endoftext|>", "<|im_end|>"]
|
65 |
+
instruction = '<|System|>\n' + system_prompt + '\n'
|
66 |
for user, assistant in history:
|
67 |
+
instruction += f'<|User|>\n{user}\n<|Assistant|>\n{assistant}\n'
|
68 |
+
instruction += f'<|User|>\n{message}\n<|Assistant|>\n'
|
69 |
|
70 |
print(instruction)
|
71 |
|