wasertech commited on
Commit
5fe5de2
·
verified ·
1 Parent(s): f6c46f3

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +2 -2
README.md CHANGED
@@ -92,8 +92,8 @@ print("Ready to chat!")
92
  conversation = [{'role': "system", 'content': """You are an helpful Assistant."""}]
93
 
94
  def chat(conversation):
95
- input = tokenizer.apply_chat_template(conversation, tokenize=False)
96
- response = pipe(input)
97
  if response:
98
  reply = response[0]['generated_text'].split("<|im_end|>\n")[-1].lstrip("<|im_start|> assistant\n")
99
  # print(reply) # should be done outside of the function
 
92
  conversation = [{'role': "system", 'content': """You are an helpful Assistant."""}]
93
 
94
  def chat(conversation):
95
+ input_conv = tokenizer.apply_chat_template(conversation, tokenize=False)
96
+ response = pipe(input_conv)
97
  if response:
98
  reply = response[0]['generated_text'].split("<|im_end|>\n")[-1].lstrip("<|im_start|> assistant\n")
99
  # print(reply) # should be done outside of the function