Created
December 14, 2022 16:28
-
-
Save kedisho/f7cbc60d21ccadda2d59bee3c9853d52 to your computer and use it in GitHub Desktop.
This file contains 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 XLMRobertaTokenizerFast | |
from transformers import XLMRobertaForSequenceClassification | |
BERT_MODEL = "sentence-transformers/LaBSE " | |
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