Views
No views yet
1from transformers import pipeline
2classifier = pipeline("text-classification", model="j-hartmann/sentiment-roberta-large-english-3-classes", return_all_scores=True)
3classifier("This is so nice!")1Output:
2[[{'label': 'negative', 'score': 0.00016451838018838316},
3 {'label': 'neutral', 'score': 0.000174045650055632},
4 {'label': 'positive', 'score': 0.9996614456176758}]]@article{hartmann2021,
title={The Power of Brand Selfies},
author={Hartmann, Jochen and Heitmann, Mark and Schamp, Christina and Netzer, Oded},
journal={Journal of Marketing Research}
year={2021}
}