Update README.md
Browse files
README.md
CHANGED
|
@@ -25,7 +25,6 @@ generator = pipeline("text-generation", model="mariasandu/python-coding-assistan
|
|
| 25 |
|
| 26 |
tokenizer = AutoTokenizer.from_pretrained("mariasandu/python-coding-assistant-v2")
|
| 27 |
tokenizer.chat_template = "{% for message in messages %}{% if message['role'] == 'user' %}[INST] {{ message['content'] }} [/INST]{% else %}{{ message['content'] }}{% endif %}{% endfor %}"
|
| 28 |
-
formatted_chat = tokenizer.apply_chat_template(chat, tokenize=True, return_dict=True, continue_final_message=True)
|
| 29 |
output = generator(question)
|
| 30 |
print(output["generated_text"])
|
| 31 |
```
|
|
|
|
| 25 |
|
| 26 |
tokenizer = AutoTokenizer.from_pretrained("mariasandu/python-coding-assistant-v2")
|
| 27 |
tokenizer.chat_template = "{% for message in messages %}{% if message['role'] == 'user' %}[INST] {{ message['content'] }} [/INST]{% else %}{{ message['content'] }}{% endif %}{% endfor %}"
|
|
|
|
| 28 |
output = generator(question)
|
| 29 |
print(output["generated_text"])
|
| 30 |
```
|