Update README.md
#1
by
Den4ikAI
- opened
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>'
|