update example
Browse filesSigned-off-by: mymusise <mymusise1@gmail.com>
README.md
CHANGED
@@ -27,8 +27,8 @@ tokenizer = BertTokenizer.from_pretrained("mymusise/EasternFantasyNoval")
|
|
27 |
model = TFGPT2LMHeadModel.from_pretrained("mymusise/EasternFantasyNoval")
|
28 |
|
29 |
text_generator = TextGenerationPipeline(model, tokenizer)
|
30 |
-
print(text_generator("今日", max_length=64, do_sample=True, top_k=10))
|
31 |
-
print(text_generator("跨越山丘", max_length=64, do_sample=True, top_k=10))
|
32 |
```
|
33 |
输出
|
34 |
```text
|
|
|
27 |
model = TFGPT2LMHeadModel.from_pretrained("mymusise/EasternFantasyNoval")
|
28 |
|
29 |
text_generator = TextGenerationPipeline(model, tokenizer)
|
30 |
+
print(text_generator("今日", max_length=64, repetition_penalty=1.3, do_sample=True, top_k=10))
|
31 |
+
print(text_generator("跨越山丘", max_length=64, repetition_penalty=1.3, do_sample=True, top_k=10))
|
32 |
```
|
33 |
输出
|
34 |
```text
|