Downloads · 30 days
9
53% of all-time downloads
Siyam025/MODEL-1
MODEL-1 is a machine learning model from Siyam025. Use it for the machine learning task on the model card, and read the license before you ship it in a product.
sentiment-bert-small is a compact BERT-based sequence classification model fine-tuned for binary sentiment analysis (POSITIVE / NEGATIVE) on a diverse multi-domain corpus (product reviews, social posts, and short arti…
Downloads · 30 days
9
53% of all-time downloads
All-time downloads
17
Public
Repo size
—
Likes
0
Public
Click a slice to open those files.
.md2.2 KB · 40%
From the Hugging Face model README
sentiment-bert-small is a compact BERT-based sequence classification model fine-tuned for binary sentiment analysis (POSITIVE / NEGATIVE) on a diverse multi-domain corpus (product reviews, social posts, and short articles). The model is optimized for fast inference while maintaining strong accuracy for downstream classification tasks.
[CLS] pooled output (single-label classification)This model is intended for:
Not intended for:
from transformers import AutoTokenizer, AutoModelForSequenceClassification, pipeline
model_id = "your-username/sentiment-bert-small"
# Load tokenizer and model
tokenizer = AutoTokenizer.from_pretrained(model_id)
model = AutoModelForSequenceClassification.from_pretrained(model_id)
# Create a pipeline
sentiment = pipeline("text-classification", model=model, tokenizer=tokenizer, return_all_scores=False)
examples = [
"I absolutely loved the product — exceeded my expectations.",
"The update made things worse; I'm very disappointed."
]
for text in examples:
result = sentiment(text)[0]
print(f"Text: {text}\nLabel: {result['label']}, Score: {result['score']:.4f}\n")