Skip to content

Instantly share code, notes, and snippets.

@kedisho
Created December 14, 2022 16:18
Show Gist options
  • Save kedisho/12da3858eec023cfeb4a4c29bd53b377 to your computer and use it in GitHub Desktop.
Save kedisho/12da3858eec023cfeb4a4c29bd53b377 to your computer and use it in GitHub Desktop.
from transformers import BertTokenizer
from transformers import BertForSequenceClassification
BERT_MODEL = "bert-base-multilingual-uncased"
tokenizer = BertTokenizer.from_pretrained(BERT_MODEL)
model = BertForSequenceClassification.from_pretrained(BERT_MODEL, num_labels = len(label2idx))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment