Update README.md
Browse files
README.md
CHANGED
@@ -26,13 +26,13 @@ You can use this model directly with a pipeline for text generation.
|
|
26 |
>>> from transformers import pipeline, set_seed
|
27 |
>>> generator = pipeline('text-generation', model='ku-nlp/gpt2-small-japanese-char')
|
28 |
>>> set_seed(5)
|
29 |
-
>>> generator("
|
30 |
|
31 |
-
[{'generated_text': '
|
32 |
-
{'generated_text': '
|
33 |
-
{'generated_text': '
|
34 |
-
{'generated_text': '
|
35 |
-
{'generated_text': '
|
36 |
```
|
37 |
|
38 |
You can also use this model to get the features of a given text.
|
|
|
26 |
>>> from transformers import pipeline, set_seed
|
27 |
>>> generator = pipeline('text-generation', model='ku-nlp/gpt2-small-japanese-char')
|
28 |
>>> set_seed(5)
|
29 |
+
>>> generator("<s>昨日私は京都で", max_length=30, do_sample=True, num_return_sequences=5)
|
30 |
|
31 |
+
[{'generated_text': '<s>昨日私は京都で仕事して、今日は大阪に行くのですが今日はいつ'},
|
32 |
+
{'generated_text': '<s>昨日私は京都で開催された「みんなで!アラーム学習アワード2'},
|
33 |
+
{'generated_text': '<s>昨日私は京都で行われましたコンフェクションフォーラムへ行っ'},
|
34 |
+
{'generated_text': '<s>昨日私は京都では雪が解けるまで寝た様子があります・・・(;'},
|
35 |
+
{'generated_text': '<s>昨日私は京都でも27回生の卒業式を行わせていただいておりま'}]
|
36 |
```
|
37 |
|
38 |
You can also use this model to get the features of a given text.
|