Matt commited on
Commit
71364cd
·
1 Parent(s): 76841eb
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -27,7 +27,7 @@ def apply_chat_template(template, test_conversation1, test_conversation2):
27
  tokenizer.chat_template = template
28
  outputs = []
29
  for i, conversation_str in enumerate((test_conversation1, test_conversation2)):
30
- conversation = json.loads(conversation)
31
  without_gen = tokenizer.apply_chat_template(conversation, tokenize=False)
32
  with_gen = tokenizer.apply_chat_template(conversation, tokenize=False, add_generation_prompt=True)
33
  out = f"Conversation {i}:\n\n{conversation_str}\n\nOutput without generation prompt:\n\n{without_gen}\n\nOutput with generation prompt:\n\n{with_gen}\n\n"
 
27
  tokenizer.chat_template = template
28
  outputs = []
29
  for i, conversation_str in enumerate((test_conversation1, test_conversation2)):
30
+ conversation = json.loads(conversation_str)
31
  without_gen = tokenizer.apply_chat_template(conversation, tokenize=False)
32
  with_gen = tokenizer.apply_chat_template(conversation, tokenize=False, add_generation_prompt=True)
33
  out = f"Conversation {i}:\n\n{conversation_str}\n\nOutput without generation prompt:\n\n{without_gen}\n\nOutput with generation prompt:\n\n{with_gen}\n\n"