Randolphzeng
commited on
Commit
•
827a016
1
Parent(s):
dcdcc51
Update README.md
Browse files
README.md
CHANGED
@@ -20,9 +20,12 @@ model = TransfoXLDenoiseModel.from_pretrained('IDEA-CCNL/Transformer-XL-denoise-
|
|
20 |
```
|
21 |
|
22 |
### generation
|
23 |
-
|
24 |
-
|
25 |
-
|
|
|
|
|
|
|
26 |
|
27 |
## Citation
|
28 |
If you find the resource is useful, please cite the following website in your paper.
|
|
|
20 |
```
|
21 |
|
22 |
### generation
|
23 |
+
```python
|
24 |
+
from fengshen.models.transfo_xl_denoise.generate import denoise_generate
|
25 |
+
input_text = "凡是有成就的人, 都很严肃地对待生命自己的"
|
26 |
+
res = denoise_generate(model, tokenizer, input_text)
|
27 |
+
print(res) # "有成就的人都很严肃地对待自己的生命。"
|
28 |
+
```
|
29 |
|
30 |
## Citation
|
31 |
If you find the resource is useful, please cite the following website in your paper.
|