uer commited on
Commit
17a180a
1 Parent(s): f3127fa

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +6 -8
README.md CHANGED
@@ -9,17 +9,15 @@ widget:
9
 
10
  ## Model description
11
 
12
- This model is used to generate Chinese couplets and is pre-trained by [UER-py](https://www.aclweb.org/anthology/D19-3041.pdf).
13
 
14
- You can download this model via HuggingFace from the link :[gpt2-chinese-couplet][couplet]
15
 
16
  ## How to use
17
 
18
- Because the parameter ***skip_special_tokens*** is used in the ***pipelines.py*** , special tokens such as [SEP], [UNK] will be deleted, and the output results may not be neat.
19
 
20
- You can use this model directly with a pipeline for text generation:
21
-
22
- When the parameter ***skip_special_tokens*** is True:
23
 
24
  ```python
25
  >>> from transformers import BertTokenizer, GPT2LMHeadModel, TextGenerationPipeline
@@ -31,7 +29,7 @@ When the parameter ***skip_special_tokens*** is True:
31
  [{'generated_text': '[CLS]丹 枫 江 冷 人 初 去 - 黄 叶 声 从 天 外 来 阅 旗'}]
32
  ```
33
 
34
- When the parameter ***skip_special_tokens*** is Flase:
35
 
36
  ```python
37
  >>> from transformers import BertTokenizer, GPT2LMHeadModel, TextGenerationPipeline
@@ -45,7 +43,7 @@ When the parameter ***skip_special_tokens*** is Flase:
45
 
46
  ## Training data
47
 
48
- Contains about 700,000 chinese couplets.
49
 
50
  ## Training procedure
51
 
 
9
 
10
  ## Model description
11
 
12
+ The model is used to generate Chinese couplets. You can download the model either from the [GPT2-Chinese Github page](https://github.com/Morizeyao/GPT2-Chinese), or via HuggingFace from the link [gpt2-chinese-couplet][couplet].
13
 
14
+ Since the parameter skip_special_tokens is used in the pipelines.py, special tokens such as [SEP], [UNK] will be deleted, and the output results may not be neat.
15
 
16
  ## How to use
17
 
18
+ You can use the model directly with a pipeline for text generation:
19
 
20
+ When the parameter skip_special_tokens is True:
 
 
21
 
22
  ```python
23
  >>> from transformers import BertTokenizer, GPT2LMHeadModel, TextGenerationPipeline
 
29
  [{'generated_text': '[CLS]丹 枫 江 冷 人 初 去 - 黄 叶 声 从 天 外 来 阅 旗'}]
30
  ```
31
 
32
+ When the parameter skip_special_tokens is False:
33
 
34
  ```python
35
  >>> from transformers import BertTokenizer, GPT2LMHeadModel, TextGenerationPipeline
 
43
 
44
  ## Training data
45
 
46
+ Contains 700,000 Chinese couplets collected by [couplet-clean-dataset](https://github.com/v-zich/couplet-clean-dataset).
47
 
48
  ## Training procedure
49