Update README.md
Browse files
README.md
CHANGED
@@ -32,8 +32,8 @@ When the parameter skip_special_tokens is False:
|
|
32 |
|
33 |
```python
|
34 |
>>> from transformers import BertTokenizer, GPT2LMHeadModel, TextGenerationPipeline
|
35 |
-
>>> tokenizer = BertTokenizer.from_pretrained("uer/gpt2-chinese-
|
36 |
-
>>> model = GPT2LMHeadModel.from_pretrained("uer/gpt2-chinese-
|
37 |
>>> text_generator = TextGenerationPipeline(model, tokenizer)
|
38 |
>>> text_generator("[CLS]丹 枫 江 冷 人 初 去 -", max_length=25, do_sample=True)
|
39 |
[{'generated_text': '[CLS]丹 枫 江 冷 人 初 去 - 黄 叶 声 我 酒 不 辞 [SEP] [SEP] [SEP] [SEP] [SEP] [SEP] [SEP] [SEP] [SEP]'}]
|
|
|
32 |
|
33 |
```python
|
34 |
>>> from transformers import BertTokenizer, GPT2LMHeadModel, TextGenerationPipeline
|
35 |
+
>>> tokenizer = BertTokenizer.from_pretrained("uer/gpt2-chinese-couplet")
|
36 |
+
>>> model = GPT2LMHeadModel.from_pretrained("uer/gpt2-chinese-couplet")
|
37 |
>>> text_generator = TextGenerationPipeline(model, tokenizer)
|
38 |
>>> text_generator("[CLS]丹 枫 江 冷 人 初 去 -", max_length=25, do_sample=True)
|
39 |
[{'generated_text': '[CLS]丹 枫 江 冷 人 初 去 - 黄 叶 声 我 酒 不 辞 [SEP] [SEP] [SEP] [SEP] [SEP] [SEP] [SEP] [SEP] [SEP]'}]
|