Update README.md
Browse files
README.md
CHANGED
@@ -26,7 +26,9 @@ You can use this model directly with a pipeline for text generation. Since the g
|
|
26 |
|
27 |
```python
|
28 |
from transformers import pipeline, set_seed
|
29 |
-
generator = pipeline('text-generation', model='nlp-waseda/gpt2-xl-japanese
|
|
|
|
|
30 |
|
31 |
set_seed(42)
|
32 |
generator("早稲田 大学 で 自然 言語 処理 を", max_length=30, do_sample=True, pad_token_id=2, num_return_sequences=5)
|
|
|
26 |
|
27 |
```python
|
28 |
from transformers import pipeline, set_seed
|
29 |
+
generator = pipeline('text-generation', model='nlp-waseda/gpt2-xl-japanese
|
30 |
+
# if you have a gpu.
|
31 |
+
# generator = pipeline('text-generation', model='nlp-waseda/gpt2-xl-japanese', device=0)
|
32 |
|
33 |
set_seed(42)
|
34 |
generator("早稲田 大学 で 自然 言語 処理 を", max_length=30, do_sample=True, pad_token_id=2, num_return_sequences=5)
|