Created
April 9, 2020 15:45
-
-
Save ofafa/37169529c5b5eb82556351735abf89ce to your computer and use it in GitHub Desktop.
A very simple BERT for Chinese mask-filling task
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from transformers import pipeline | |
nlp = pipeline('fill-mask', model="bert-base-chinese", tokenizer="bert-base-chinese") | |
nlp("內容推薦"+nlp.tokenizer.mask_token+"驗室") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment