from transformers import pipeline
classifier = pipeline("sentiment-analysis")

The [pipeline] downloads and caches a default pretrained model and tokenizer for sentiment analysis. Now you can use the classifier on your target text:

classifier("We are very happy to show you the 🤗 Transformers library.")
[{'label': 'POSITIVE', 'score': 0.9998}]

If you have more than one input, pass your inputs as a list to the [pipeline] to return a list of dictionaries: