Spaces:
Sleeping
Sleeping
from transformers import pipeline | |
def load_model(): | |
""" | |
Load the Hugging Face summarization model using the Hugging Face Transformers library. | |
""" | |
# Load the pre-trained summarization pipeline from Hugging Face | |
summarizer = pipeline("summarization", model="facebook/bart-large-cnn") | |
return summarizer | |