Matt commited on
Commit
76841eb
·
1 Parent(s): 814e23a
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -26,7 +26,7 @@ conversations = [demo_conversation1, demo_conversation2]
26
  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)
 
26
  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)