Spaces:
Running
Running
Update abstractive_model.py
Browse files- abstractive_model.py +1 -1
abstractive_model.py
CHANGED
@@ -2,7 +2,7 @@ from transformers import pipeline
|
|
2 |
|
3 |
summarizer = pipeline("summarization", model="EE21/BART-ToSSimplify")
|
4 |
|
5 |
-
def
|
6 |
# Use the pipeline to generate a summary
|
7 |
summary = summarizer(input_text, max_length=150, min_length=40, length_penalty=2.0, num_beams=4, early_stopping=True)
|
8 |
return summary[0]['summary_text']
|
|
|
2 |
|
3 |
summarizer = pipeline("summarization", model="EE21/BART-ToSSimplify")
|
4 |
|
5 |
+
def summarize_with_bart(input_text):
|
6 |
# Use the pipeline to generate a summary
|
7 |
summary = summarizer(input_text, max_length=150, min_length=40, length_penalty=2.0, num_beams=4, early_stopping=True)
|
8 |
return summary[0]['summary_text']
|