Spaces:
Sleeping
Sleeping
nroggendorff
commited on
Commit
•
eaa34ca
1
Parent(s):
43caee5
Update app.py
Browse files
app.py
CHANGED
@@ -13,7 +13,7 @@ def generate_chatml(user_messages, assistant_messages):
|
|
13 |
|
14 |
if i < len(assistant_messages) and assistant_messages[i].strip():
|
15 |
chatml += f"<|im_start|>assistant\n{assistant_messages[i].strip()}\n<|im_end|>\n"
|
16 |
-
return chatml[
|
17 |
|
18 |
with gr.Blocks() as demo:
|
19 |
gr.Markdown("# ChatML Template Generator\n## This will generate a prompt for you to enter to ChatGPT.\n### There should be one more item in the user field for it to work.")
|
|
|
13 |
|
14 |
if i < len(assistant_messages) and assistant_messages[i].strip():
|
15 |
chatml += f"<|im_start|>assistant\n{assistant_messages[i].strip()}\n<|im_end|>\n"
|
16 |
+
return chatml[17:-11]
|
17 |
|
18 |
with gr.Blocks() as demo:
|
19 |
gr.Markdown("# ChatML Template Generator\n## This will generate a prompt for you to enter to ChatGPT.\n### There should be one more item in the user field for it to work.")
|