from transformers import pipeline sentiment_pipeline = pipeline("sentiment-analysis") def predict(data): sentiment_pipeline(data)