Views
No views yet
1from transformers import pipeline
2
3# Create the pipeline
4sentiment_classifier = pipeline('text-classification', model='AdamCodd/distilbert-base-uncased-finetuned-sentiment-amazon')
5
6# Now you can use the pipeline to get the sentiment
7result = sentiment_classifier("This product doesn't fit me at all.")
8print(result)
9#[{'label': 'negative', 'score': 0.9994848966598511}]| key | value |
|---|---|
| eval_accuracy | 0.94112 |
| eval_auc | 0.9849 |
| eval_f1_score | 0.9417 |
| eval_precision | 0.9321 |
| eval_recall | 0.95149 |