Mishmosh commited on
Commit
b9b212f
·
1 Parent(s): 6395bf3

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -236,7 +236,7 @@ for key in text_per_page.keys(): # go through keys in dictionary
236
  break
237
  print(abstract_from_pdf)
238
 
239
- #from transformers import pipeline
240
  summarizer = pipeline("summarization", model="ainize/bart-base-cnn")
241
  #summarizer = pipeline("summarization", model="linydub/bart-large-samsum") # various models were tried and the best one was selected
242
  #summarizer = pipeline("summarization", model="slauw87/bart_summarisation")
@@ -252,7 +252,7 @@ print(summarized_text)
252
  # the aim of this section of code is to get a summary of just one sentence by summarizing the summary all while the summary is longer than one sentence.
253
  # unfortunately, I tried many many models and none of them actually summarize the text to as short as one sentence.
254
  #I had searched for ways to fine tune the summarization model to specify that the summarization should be done in just one sentence but did not find a way to implement it
255
- #from transformers import pipeline
256
  summarized_text_list_list=summarized_text_list['summary_text']
257
  summarizer = pipeline("summarization", model="facebook/bart-large-cnn")
258
  #print(summarizer)
 
236
  break
237
  print(abstract_from_pdf)
238
 
239
+ from transformers import pipeline
240
  summarizer = pipeline("summarization", model="ainize/bart-base-cnn")
241
  #summarizer = pipeline("summarization", model="linydub/bart-large-samsum") # various models were tried and the best one was selected
242
  #summarizer = pipeline("summarization", model="slauw87/bart_summarisation")
 
252
  # the aim of this section of code is to get a summary of just one sentence by summarizing the summary all while the summary is longer than one sentence.
253
  # unfortunately, I tried many many models and none of them actually summarize the text to as short as one sentence.
254
  #I had searched for ways to fine tune the summarization model to specify that the summarization should be done in just one sentence but did not find a way to implement it
255
+ from transformers import pipeline
256
  summarized_text_list_list=summarized_text_list['summary_text']
257
  summarizer = pipeline("summarization", model="facebook/bart-large-cnn")
258
  #print(summarizer)