Downloads · 30 days
11
11% of all-time downloads
advexon/multilingual-sentiment-classifier
multilingual-sentiment-classifier is a text classification model from advexon. Use it when you need a label for a piece of text. It is set up for transformers. The card lists the license as mit.
Multilingual text classification model trained on XLM-RoBERTa base for sentiment analysis across English, Russian, Tajik and other languages
Downloads · 30 days
11
11% of all-time downloads
All-time downloads
104
Public
Repo size
2.2 GB
Likes
1
Public
Click a slice to open those files.
.pt1.1 GB · 50%
From the Hugging Face model README
Multilingual text classification model trained on XLM-RoBERTa base for sentiment analysis across English, Russian, Tajik and other languages
This is a multilingual text classification model based on XLM-RoBERTa. It has been fine-tuned for sentiment analysis across multiple languages and can classify text into positive, negative, and neutral categories.
Based on training metrics:
from transformers import AutoTokenizer, AutoModelForSequenceClassification
import torch
# Load the model and tokenizer
tokenizer = AutoTokenizer.from_pretrained("advexon/multilingual-sentiment-classifier")
model = AutoModelForSequenceClassification.from_pretrained("advexon/multilingual-sentiment-classifier")
# Example usage
text = "This product is amazing!"
inputs = tokenizer(text, return_tensors="pt", truncation=True, padding=True)
outputs = model(**inputs)
predictions = torch.softmax(outputs.logits, dim=-1)
predicted_class = torch.argmax(predictions, dim=1).item()
# Class mapping: 0=Negative, 1=Neutral, 2=Positive
sentiment_labels = ["Negative", "Neutral", "Positive"]
predicted_sentiment = sentiment_labels[predicted_class]
print(f"Predicted sentiment: {predicted_sentiment}")
This model was trained using:
The model uses the XLM-RoBERTa architecture with:
If you use this model in your research, please cite:
@misc{multilingual-text-classifier,
title={Multilingual Text Classification Model},
author={Advexon},
year={2024},
publisher={Siyovush Mirzoev},
journal={Hugging Face Hub},
howpublished={\url{https://huggingface.co/advexon/multilingual-sentiment-classifier}},
}
mirzoevsish@gmail.com / +992 710707777 WhatsApp