EE21 commited on
Commit
ada4af5
1 Parent(s): 5f89cc0

Update abstractive_summarization.py

Browse files
Files changed (1) hide show
  1. abstractive_summarization.py +1 -1
abstractive_summarization.py CHANGED
@@ -15,7 +15,7 @@ def summarize_with_bart_ft(input_text):
15
  def summarize_with_bart_cnn(input_text):
16
  pipe = pipeline("summarization", model="facebook/bart-large-cnn")
17
  summary = pipe(input_text, max_length=300, min_length=100, num_beams=1, early_stopping=False, length_penalty=1)
18
- return summary[0]['summary_text']
19
 
20
  # Function to summarize using led-base-book-summary
21
  def summarize_with_led(input_text):
 
15
  def summarize_with_bart_cnn(input_text):
16
  pipe = pipeline("summarization", model="facebook/bart-large-cnn")
17
  summary = pipe(input_text, max_length=300, min_length=100, num_beams=1, early_stopping=False, length_penalty=1)
18
+ return summary
19
 
20
  # Function to summarize using led-base-book-summary
21
  def summarize_with_led(input_text):