Downloads · 30 days
14
8% of all-time downloads
sakhawat-hossen/bangla-sentiment-banglabert
bangla-sentiment-banglabert is a text classification model from sakhawat-hossen. Use it when you need a label for a piece of text. The card lists the license as apache-2.0.
This is a fine‑tuned BanglaBERT model trained on the BANEmo Dataset (https://ieeexplore.ieee.org/document/11171926) for Bangla sentiment analysis. It classifies Bangla comments into two categories: - 0 → Sadness 😢 -…
Downloads · 30 days
14
8% of all-time downloads
All-time downloads
179
Public
Parameters
164M
658 MB on disk
Likes
1
Public
Click a slice to open those files.
.safetensors658 MB · 99%
From the Hugging Face model README
This is a fine‑tuned BanglaBERT model trained on the BANEmo Dataset (https://ieeexplore.ieee.org/document/11171926) for Bangla sentiment analysis.
It classifies Bangla comments into two categories:
sagorsharma/banglabertfrom transformers import AutoTokenizer, AutoModelForSequenceClassification
import torch
# Load model and tokenizer
model = AutoModelForSequenceClassification.from_pretrained("sakhawat-hossen/bangla-sentiment-banglabert")
tokenizer = AutoTokenizer.from_pretrained("sakhawat-hossen/bangla-sentiment-banglabert")
# Example prediction
text = "আজ আমি খুব খুশি।"
inputs = tokenizer(text, return_tensors="pt", truncation=True, padding=True)
with torch.no_grad():
outputs = model(**inputs)
prediction = torch.argmax(outputs.logits, dim=-1).item()
print("Prediction:", "Happiness 😀" if prediction == 1 else "Sadness 😢")