from transformers import AutoTokenizer, AutoModelForSequenceClassification tokenizer = AutoTokenizer.from_pretrained("daigo/bert-base-japanese-sentiment") model = AutoModelForSequenceClassification.from_pretrained("daigo/bert-base-japanese-sentiment")
git lfs install git clone https://huggingface.co/daigo/bert-base-japanese-sentiment # if you want to clone without large files – just their pointers # prepend your git clone with the following env var: GIT_LFS_SKIP_SMUDGE=1
binary classification
print(pipeline("sentiment-analysis",model="daigo/bert-base-japanese-sentiment",tokenizer="daigo/bert-base-japanese-sentiment")("私は幸福である。")) [{'label': 'ポジティブ', 'score': 0.98430425}]
Mask token: [MASK]
[MASK]
⚡️ Upgrade your account to access the Inference API