BERTc-315M-CSC / example_correct.py
tf-bao's picture
Update inference code and model card
551eb96 verified
Raw
History Blame Contribute Delete
246 Bytes
"""BERTc-CSC:中文拼写纠错。"""
from csc_model import BERTcForCSC
model = BERTcForCSC.from_pretrained(".")
for s in ["我今天很稿兴", "他的身体健康状况很不错,平时喜欢锻练"]:
print(f"{s}{model.correct(s)}")