Update README.md
Browse files
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)
|