dschandra commited on
Commit
9e886b1
·
verified ·
1 Parent(s): 7fc4ba1

Create model.py

Browse files
Files changed (1) hide show
  1. model.py +9 -0
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