Spaces:
Sleeping
Sleeping
Create model.py
Browse files
model.py
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
from transformers import pipeline
|
| 2 |
+
|
| 3 |
+
def load_model():
|
| 4 |
+
"""
|
| 5 |
+
Load the Hugging Face summarization model using the Hugging Face Transformers library.
|
| 6 |
+
"""
|
| 7 |
+
# Load the pre-trained summarization pipeline from Hugging Face
|
| 8 |
+
summarizer = pipeline("summarization", model="facebook/bart-large-cnn")
|
| 9 |
+
return summarizer
|