Update README.md
Browse files
README.md
CHANGED
@@ -55,10 +55,10 @@ Run the code:
|
|
55 |
|
56 |
```python
|
57 |
import argparse
|
58 |
-
from fengshen import
|
59 |
|
60 |
total_parser = argparse.ArgumentParser("TASK NAME")
|
61 |
-
total_parser =
|
62 |
args = total_parser.parse_args()
|
63 |
|
64 |
args.pretrained_model_path = "IDEA-CCNL/Erlangshen-Ubert-110M-Chinese"
|
@@ -75,7 +75,7 @@ test_data=[
|
|
75 |
"id": 0}
|
76 |
]
|
77 |
|
78 |
-
model =
|
79 |
result = model.predict(test_data)
|
80 |
for line in result:
|
81 |
print(line)
|
|
|
55 |
|
56 |
```python
|
57 |
import argparse
|
58 |
+
from fengshen import UbertPipelines
|
59 |
|
60 |
total_parser = argparse.ArgumentParser("TASK NAME")
|
61 |
+
total_parser = UbertPipelines.pipelines_args(total_parser)
|
62 |
args = total_parser.parse_args()
|
63 |
|
64 |
args.pretrained_model_path = "IDEA-CCNL/Erlangshen-Ubert-110M-Chinese"
|
|
|
75 |
"id": 0}
|
76 |
]
|
77 |
|
78 |
+
model = UbertPipelines(args)
|
79 |
result = model.predict(test_data)
|
80 |
for line in result:
|
81 |
print(line)
|