Downloads · 30 days
2
4% of all-time downloads
unicorn-s/nepal-border-sentiment-xlmr
nepal-border-sentiment-xlmr is a text classification model from unicorn-s. Use it when you need a label for a piece of text. The card lists the license as mit.
XLM-RoBERTa-base fine-tuned for 3-class sentiment classification (positive/neutral/negative) on Nepali and English YouTube comments discussing the Nepal–India border dispute.
Downloads · 30 days
2
4% of all-time downloads
All-time downloads
57
Public
Parameters
278M
10 GB on disk
Likes
0
Public
Click a slice to open those files.
.pt6.7 GB · 60%
From the Hugging Face model README
XLM-RoBERTa-base fine-tuned for 3-class sentiment classification (positive/neutral/negative) on Nepali and English YouTube comments discussing the Nepal–India border dispute.
Trained on the Nepal Border Sentiment Dataset — ~2100 YouTube comments scraped from 17 Nepali news and commentary channels.
from transformers import AutoTokenizer, AutoModelForSequenceClassification
import torch
model = AutoModelForSequenceClassification.from_pretrained("unicorn-s/nepal-border-sentiment-xlmr")
tokenizer = AutoTokenizer.from_pretrained("xlm-roberta-base")
text = "Your Nepali or English comment here"
inputs = tokenizer(text, return_tensors="pt", truncation=True, max_length=128)
with torch.no_grad():
outputs = model(**inputs)
probs = torch.softmax(outputs.logits, dim=-1)
labels = ['negative', 'neutral', 'positive']
print({labels[i]: float(probs[0][i]) for i in range(3)})
This is published as a baseline for low-resource Nepali political sentiment analysis. Contributions of additional labeled data and improved baselines are welcome — see the GitHub repo.