Downloads · 30 days
4
5% of all-time downloads
mishrabp/bert-base-uncased-tweet-sentiment-analysis
bert-base-uncased-tweet-sentiment-analysis is a text classification model from mishrabp. Use it when you need a label for a piece of text. It is set up for transformers.
This model is a BERT-based transformer (bert-base-uncased) fine-tuned for sentiment analysis on tweets. It classifies text into six emotion categories: sadness, joy, love, anger, fear, and surprise. The model was trai…
Downloads · 30 days
4
5% of all-time downloads
All-time downloads
79
Public
Parameters
109M
1.3 GB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors438 MB · 100%
From the Hugging Face model README
This model is a BERT-based transformer (bert-base-uncased) fine-tuned for sentiment analysis on tweets. It classifies text into six emotion categories: sadness, joy, love, anger, fear, and surprise. The model was trained with a custom classification head on tweet data to capture short-form, social media style text.
This model can be used to classify tweets or short text into emotions, useful for social listening, customer sentiment analysis, and marketing insights.
The model can be integrated into larger NLP pipelines, such as real-time social media monitoring dashboards, chatbots, or recommendation systems that require sentiment-aware behavior.
Use this model for exploratory sentiment analytics and not for critical decisions. Always review predictions in the context of business requirements.
from transformers import AutoTokenizer, AutoModelForSequenceClassification, pipeline
model_name = "mishrabp/bert-base-uncased-tweet-sentiment-analysis"
tokenizer = AutoTokenizer.from_pretrained(model_name)
model = AutoModelForSequenceClassification.from_pretrained(model_name)
classifier = pipeline("text-classification", model=model, tokenizer=tokenizer)
tweets = [
"I love spending time with my friends!",
"I feel so sad about the news today."
]
results = classifier(tweets)
print(results)
[
{"label": "love", "score": 0.95},
{"label": "sadness", "score": 0.88}
]
| ID | Emotion |
| -- | -------- |
| 0 | sadness |
| 1 | joy |
| 2 | love |
| 3 | anger |
| 4 | fear |
| 5 | surprise |