Spaces:
Runtime error
Runtime error
Matt
commited on
Commit
·
93451f9
1
Parent(s):
3770856
Bugfix
Browse files
app.py
CHANGED
@@ -22,6 +22,7 @@ def apply_chat_template(template):
|
|
22 |
without_gen = tokenizer.apply_chat_template(conversation, tokenize=False)
|
23 |
with_gen = tokenizer.apply_chat_template(conversation, tokenize=False, add_generation_prompt=True)
|
24 |
out += f"Conversation {i} without generation prompt:\n\n{without_gen}\n\nConversation {i} with generation prompt:\n\n{with_gen}\n\n"
|
|
|
25 |
|
26 |
iface = gr.Interface(fn=apply_chat_template, inputs="text", outputs="text")
|
27 |
iface.launch()
|
|
|
22 |
without_gen = tokenizer.apply_chat_template(conversation, tokenize=False)
|
23 |
with_gen = tokenizer.apply_chat_template(conversation, tokenize=False, add_generation_prompt=True)
|
24 |
out += f"Conversation {i} without generation prompt:\n\n{without_gen}\n\nConversation {i} with generation prompt:\n\n{with_gen}\n\n"
|
25 |
+
return out
|
26 |
|
27 |
iface = gr.Interface(fn=apply_chat_template, inputs="text", outputs="text")
|
28 |
iface.launch()
|