shibing624
commited on
Commit
•
7f13c82
1
Parent(s):
c5c3022
Update README.md
Browse files
README.md
CHANGED
@@ -36,8 +36,8 @@ pip install -U textgen
|
|
36 |
```
|
37 |
|
38 |
```python
|
39 |
-
from textgen import
|
40 |
-
model =
|
41 |
r = model.predict(["对下面中文拼写纠错:\n少先队员因该为老人让坐。\n答:"])
|
42 |
print(r) # ['少先队员应该为老人让座。\n错误字:因,坐']
|
43 |
```
|
|
|
36 |
```
|
37 |
|
38 |
```python
|
39 |
+
from textgen import GptModel
|
40 |
+
model = GptModel("chatglm", "THUDM/chatglm-6b", peft_name="shibing624/chatglm-6b-csc-zh-lora")
|
41 |
r = model.predict(["对下面中文拼写纠错:\n少先队员因该为老人让坐。\n答:"])
|
42 |
print(r) # ['少先队员应该为老人让座。\n错误字:因,坐']
|
43 |
```
|