Views
No views yet
1from transformers import pipeline
2
3model_id = "Lokeshwaran/distilbert-base-uncased-finetuned-emotion-tweets"
4classifier = pipeline("text-classification", model = model_id)
5custom_tweet = "The movie was very good"
6preds = classifier(custom_tweet, return_all_scores=True)
7print(preds[0)
8# produces a list of dicts for each of the labels| Training Loss | Epoch | Step | Validation Loss | Accuracy | F1 |
|---|---|---|---|---|---|
| 0.7937 | 1.0 | 250 | 0.2966 | 0.9185 | 0.9180 |
| 0.2361 | 2.0 | 500 | 0.2112 | 0.928 | 0.9280 |