# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("summarization", model="facebook/bart-large-cnn") # Load model directly from transformers import AutoTokenizer, AutoModelForSeq2SeqLM tokenizer = AutoTokenizer.from_pretrained("facebook/bart-large-cnn") model = AutoModelForSeq2SeqLM.from_pretrained("facebook/bart-large-cnn")