Sasidhar commited on
Commit
ff11284
1 Parent(s): d95772b

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -42,7 +42,7 @@ def init_ner_pipeline():
42
 
43
  @st.cache(allow_output_mutation = True)
44
  def init_qa_pipeline():
45
- question_answerer_pipe = pipeline("question-answering", model='distilbert-base-cased-distilled-squad')
46
  return question_answerer_pipe
47
 
48
  def get_formatted_text_for_annotation(output):
@@ -229,7 +229,7 @@ elif selected_menu == "Summarize Document":
229
  paragraphs= get_paragraphs_for_summaries()
230
  with st.spinner("Summarizing Document..."):
231
  for text in paragraphs:
232
- summary_text = pipeline_summarization(text, max_length=130, min_length=10, do_sample=False)
233
  # Show output
234
  st.write(summary_text[0]['summary_text'])
235
  st.markdown("""---""")
 
42
 
43
  @st.cache(allow_output_mutation = True)
44
  def init_qa_pipeline():
45
+ question_answerer_pipe = pipeline("question-answering", model='deepset/roberta-base-squad2')
46
  return question_answerer_pipe
47
 
48
  def get_formatted_text_for_annotation(output):
 
229
  paragraphs= get_paragraphs_for_summaries()
230
  with st.spinner("Summarizing Document..."):
231
  for text in paragraphs:
232
+ summary_text = pipeline_summarization(text, max_length=130, min_length=30, do_sample=False)
233
  # Show output
234
  st.write(summary_text[0]['summary_text'])
235
  st.markdown("""---""")