Update README.md (#1)
Browse files- Update README.md (07722b661bf32d40a4f192fd37777f7652a0795e)
Co-authored-by: Denis Petrov <Den4ikAI@users.noreply.huggingface.co>
README.md
CHANGED
@@ -11,15 +11,15 @@ tags:
|
|
11 |
- conversational
|
12 |
---
|
13 |
|
14 |
-
|
15 |
|
16 |
```python
|
17 |
import torch
|
18 |
from transformers import AutoTokenizer, AutoModelForSeq2SeqLM
|
19 |
|
20 |
device='cuda'
|
21 |
-
tokenizer = AutoTokenizer.from_pretrained('TeraSpace/
|
22 |
-
model = AutoModelForSeq2SeqLM.from_pretrained('TeraSpace/
|
23 |
while True:
|
24 |
text_inp = input("=>")
|
25 |
lm_text=f'<SC1>- {text_inp}\n- <extra_id_0>'
|
|
|
11 |
- conversational
|
12 |
---
|
13 |
|
14 |
+
# Usage
|
15 |
|
16 |
```python
|
17 |
import torch
|
18 |
from transformers import AutoTokenizer, AutoModelForSeq2SeqLM
|
19 |
|
20 |
device='cuda'
|
21 |
+
tokenizer = AutoTokenizer.from_pretrained('TeraSpace/dialofred')
|
22 |
+
model = AutoModelForSeq2SeqLM.from_pretrained('TeraSpace/dialofred').to(device)
|
23 |
while True:
|
24 |
text_inp = input("=>")
|
25 |
lm_text=f'<SC1>- {text_inp}\n- <extra_id_0>'
|