Views
No views yet
1from transformers import pipeline
2
3classifier = pipeline("sentiment-analysis", model="Kapilydv6/my-first-sentiment-model")
4
5result = classifier("This movie was amazing!")
6print(result)
7# [{'label': 'POSITIVE', 'score': 0.99}]| Epoch | Train Loss | Eval Accuracy | Eval F1 |
|---|---|---|---|
| 1 | ~0.51 | 85.0% | 84.96% |
| 2 | ~0.26 | 86.6% | 86.55% |
| 3 | ~0.16 | 87.4% | 87.39% |
| Review | Prediction | Confidence |
|---|---|---|
| "Absolutely fantastic!" | POSITIVE | 97.9% |
| "Terrible waste of time" | NEGATIVE | 96.7% |
| "It was okay, nothing special" | NEGATIVE | 75.3% |