Update README.md
Browse files
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 |
-
|
96 |
-
response = pipe(
|
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
|