Update README.md
#13
by
dejanseo
- opened
README.md
CHANGED
|
@@ -123,9 +123,11 @@ If you want to use Hugging Face `transformers` to generate text, you can do some
|
|
| 123 |
from transformers import pipeline
|
| 124 |
|
| 125 |
messages = [
|
| 126 |
-
{"role": "
|
| 127 |
-
{"role": "
|
|
|
|
| 128 |
]
|
|
|
|
| 129 |
chatbot = pipeline("text-generation", model="mistralai/Mistral-7B-Instruct-v0.3")
|
| 130 |
chatbot(messages)
|
| 131 |
```
|
|
|
|
| 123 |
from transformers import pipeline
|
| 124 |
|
| 125 |
messages = [
|
| 126 |
+
{"role": "user", "content": "What is your favourite condiment?"},
|
| 127 |
+
{"role": "assistant", "content": "Well, I'm quite partial to a good squeeze of fresh lemon juice. It adds just the right amount of zesty flavour to whatever I'm cooking up in the kitchen!"},
|
| 128 |
+
{"role": "user", "content": "Do you have mayonnaise recipes?"}
|
| 129 |
]
|
| 130 |
+
|
| 131 |
chatbot = pipeline("text-generation", model="mistralai/Mistral-7B-Instruct-v0.3")
|
| 132 |
chatbot(messages)
|
| 133 |
```
|