EE21 commited on
Commit
3c65f2c
·
1 Parent(s): 47a4886

Update abstractive_model.py

Browse files
Files changed (1) hide show
  1. 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 summarize_with_pipeline(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']
 
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']