jeffreygo commited on
Commit
695434a
1 Parent(s): 2f53f1b

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +2 -2
README.md CHANGED
@@ -17,7 +17,7 @@ pip install transformers
17
  ```python
18
  from transformers import CPMAntTokenizer, CPMAntForCausalLM
19
 
20
- texts = "今天天气真好!"
21
  model = CPMAntForCausalLM.from_pretrained("openbmb/cpm-ant-10b")
22
  tokenizer = CPMAntTokenizer.from_pretrained("openbmb/cpm-ant-10b")
23
  input_ids = tokenizer(texts, return_tensors="pt")
@@ -28,7 +28,7 @@ print(output_texts)
28
  ```
29
  ## pipeline
30
  ```python
31
- texts = ["昨天多云转阴,", "今天天气不错,"]
32
  generator = pipeline("text-generation", model="openbmb/cpm-ant-10b", tokenizer="openbmb/cpm-ant-10b")
33
  result = generator(texts)
34
  print(result)
 
17
  ```python
18
  from transformers import CPMAntTokenizer, CPMAntForCausalLM
19
 
20
+ texts = "今天天气不错,"
21
  model = CPMAntForCausalLM.from_pretrained("openbmb/cpm-ant-10b")
22
  tokenizer = CPMAntTokenizer.from_pretrained("openbmb/cpm-ant-10b")
23
  input_ids = tokenizer(texts, return_tensors="pt")
 
28
  ```
29
  ## pipeline
30
  ```python
31
+ texts = ["今天天气不错,""新年快乐,万事如意,"]
32
  generator = pipeline("text-generation", model="openbmb/cpm-ant-10b", tokenizer="openbmb/cpm-ant-10b")
33
  result = generator(texts)
34
  print(result)