Views
No views yet
| 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.
1from transformers import AutoTokenizer, AutoModelForSequenceClassification
2import torch
3
4tokenizer = AutoTokenizer.from_pretrained("hetbhalani/roberta-enhanced-for-sentiment")
5model = AutoModelForSequenceClassification.from_pretrained("hetbhalani/roberta-enhanced-for-sentiment")
6
7text = "I really loved this movie, amazing acting and direction!"
8inputs = tokenizer(text, return_tensors="pt")
9outputs = model(**inputs)
10pred = torch.softmax(outputs.logits, dim=1)
11print(pred)