Downloads · 30 days
11
37% of all-time downloads
Divi15/sentiment-classifier-demo-5729
sentiment-classifier-demo-5729 is a text classification model from Divi15. Use it when you need a label for a piece of text. It is set up for transformers. The card lists the license as apache-2.0.
This model is based on distilbert-base-uncased-finetuned-sst-2-english and performs Sentiment analysis on English text (positive/negative classification).
Downloads · 30 days
11
37% of all-time downloads
All-time downloads
30
Public
Parameters
67M
268 MB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors268 MB · 100%
From the Hugging Face model README
This model is based on distilbert-base-uncased-finetuned-sst-2-english and performs Sentiment analysis on English text (positive/negative classification).
This model was uploaded as part of a machine learning assignment demonstrating model deployment to Hugging Face Hub.
from transformers import pipeline
# Load the model
classifier = pipeline("sentiment-analysis", model="Divi15/sentiment-classifier-demo-5729")
# Make predictions
result = classifier("I love machine learning!")
print(result)
# Expected output: [{'label': 'POSITIVE', 'score': 0.9991}]
This model is intended for:
from transformers import AutoTokenizer, AutoModelForSequenceClassification
from transformers import pipeline
tokenizer = AutoTokenizer.from_pretrained("Divi15/sentiment-classifier-demo-5729")
model = AutoModelForSequenceClassification.from_pretrained("Divi15/sentiment-classifier-demo-5729")
classifier = pipeline("sentiment-analysis", model=model, tokenizer=tokenizer)
# Test examples
examples = [
"I absolutely love this!",
"This is terrible.",
"It's okay, nothing special."
]
for text in examples:
result = classifier(text)
print(f"Text: {text}")
print(f"Result: {result}")
print()
texts = [
"Great product, highly recommended!",
"Poor quality, very disappointed.",
"Average performance, could be better."
]
results = classifier(texts)
for text, result in zip(texts, results):
print(f"{text} -> {result['label']} ({result['score']:.3f})")
@misc{sentiment_classifier_demo_5729_2024,
title={Sentiment Classifier Demo 5729},
author={Your Name},
year={2024},
publisher={Hugging Face},
url={https://huggingface.co/Divi15/sentiment-classifier-demo-5729}
}
This model card was created as part of an educational assignment on model deployment and sharing.
Last updated: 2025-09-08