Downloads · 30 days
5
12% of all-time downloads
mr-checker/distilbert-sentimentx-twitter
distilbert-sentimentx-twitter is a machine learning model from mr-checker. Use it for the machine learning task on the model card, and read the license before you ship it in a product. The card lists the license as apache-2.0.
This model is a fine-tuned version of distilbert-base-uncased trained on the Sentiment140 dataset. It is designed to classify the sentiment of short-form text (specifically tweets) into two categories: Positive and Ne…
Downloads · 30 days
5
12% of all-time downloads
All-time downloads
43
Public
Parameters
67M
Likes
0
Public
Click a slice to open those files.
.safetensors268 MB · 100%
From the Hugging Face model README
This model is a fine-tuned version of distilbert-base-uncased trained on the Sentiment140 dataset. It is designed to classify the sentiment of short-form text (specifically tweets) into two categories: Positive and Negative.
This model is intended for real-time sentiment monitoring of social media feeds, specifically Twitter (X). It is optimized for high-throughput inference environments.
The model was trained on a sample of 100,000 tweets from the Sentiment140 dataset, which contains 1.6 million tweets automatically labeled (0 = negative, 4 = positive) based on emoticons.
The model achieved the following results on the evaluation set:
Use the code below to get started with the model locally:
from transformers import AutoTokenizer, AutoModelForSequenceClassification
import torch
tokenizer = AutoTokenizer.from_pretrained("mr-checker/sentimentX-distilbert")
model = AutoModelForSequenceClassification.from_pretrained("mr-checker/sentimentX-distilbert")
text = "SentimentX is working perfectly!"
inputs = tokenizer(text, return_tensors="pt")
with torch.no_grad():
logits = model(**inputs).logits
predicted_class_id = logits.argmax().item()
# 0: Negative, 1: Positive