schnell commited on
Commit
70c5c7d
1 Parent(s): 8d60de8

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +3 -1
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)