Instructions to use cardiffnlp/twitter-xlm-roberta-base-sentiment with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use cardiffnlp/twitter-xlm-roberta-base-sentiment with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-classification", model="cardiffnlp/twitter-xlm-roberta-base-sentiment")# Load model directly from transformers import AutoTokenizer, AutoModelForSequenceClassification tokenizer = AutoTokenizer.from_pretrained("cardiffnlp/twitter-xlm-roberta-base-sentiment") model = AutoModelForSequenceClassification.from_pretrained("cardiffnlp/twitter-xlm-roberta-base-sentiment", device_map="auto") - Inference
- Notebooks
- Google Colab
- Kaggle
Questions
#1
by carmor333 - opened
Can you include new training tweets in Spanish ?
This XLM-T model has already been trained on tweets in Spanish (both for pre-training and then for sentiment analysis fine-tuning). Spanish sentiment analysis data is available in the github repo here: https://github.com/cardiffnlp/xlm-t#3---umsab-the-unified-multilingual-sentiment-analysis-benchmark (More details in the reference paper: https://arxiv.org/abs/2104.12250)
Pedrada changed discussion status to closed