Downloads · 30 days
15
9% of all-time downloads
hetbhalani/roberta-enhanced-for-sentiment
roberta-enhanced-for-sentiment is a machine learning model from hetbhalani. Use it for the machine learning task on the model card, and read the license before you ship it in a product.
This model is a fine-tuned version of RoBERTa-base for Movie Review Sentiment Analysis. It classifies text into three categories: Positive, Negative, and Neutral.
Downloads · 30 days
15
9% of all-time downloads
All-time downloads
173
Public
Parameters
125M
499 MB on disk
Likes
2
Public
Click a slice to open those files.
.safetensors499 MB · 100%
From the Hugging Face model README
This model is a fine-tuned version of RoBERTa-base for Movie Review Sentiment Analysis.
It classifies text into three categories: Positive, Negative, and Neutral.
| Attribute | Description |
|---|---|
| Model Type | Transformer-based (RoBERTa-base) |
| Task | Sentiment Classification |
| Labels | Positive, Negative, Neutral |
| Framework | PyTorch / Hugging Face Transformers |
| Language | English |
| Component | Details |
|---|---|
| Base Model | roberta-base |
| Dataset | Custom dataset of movie reviews |
| Split | 80% train / 10% validation / 10% test |
| Loss | Cross-Entropy |
| Optimizer | AdamW |
| Epochs | 3–6 |
| Max Sequence Length | 256 |
| Batch Size | 16 |
| Learning Rate | 2e-5 |
| Metric | Score |
|---|---|
| Accuracy | add value |
| F1 Score | add value |
| Precision | add value |
| Recall | add value |
Replace placeholders with your actual validation results.
from transformers import AutoTokenizer, AutoModelForSequenceClassification
import torch
tokenizer = AutoTokenizer.from_pretrained("hetbhalani/roberta-enhanced-for-sentiment")
model = AutoModelForSequenceClassification.from_pretrained("hetbhalani/roberta-enhanced-for-sentiment")
text = "I really loved this movie, amazing acting and direction!"
inputs = tokenizer(text, return_tensors="pt")
outputs = model(**inputs)
pred = torch.softmax(outputs.logits, dim=1)
print(pred)