Gladiator commited on
Commit
6f0c363
1 Parent(s): ae25549

add spinner message

Browse files
Files changed (1) hide show
  1. app.py +6 -4
app.py CHANGED
@@ -52,12 +52,14 @@ if __name__ == "__main__":
52
  if summarize_type == "Extractive":
53
  # extractive summarizer
54
 
55
- ext_model = Summarizer()
56
- summarized_text = ext_model(inp_text, num_sentences=5)
 
57
 
58
  elif summarize_type == "Abstractive":
59
- abs_model = load_abs_model()
60
- summarized_text = abstractive_summarizer(inp_text, model=abs_model)
 
61
 
62
  # final summarized output
63
  st.subheader("Summarized text")
 
52
  if summarize_type == "Extractive":
53
  # extractive summarizer
54
 
55
+ with st.spinner(text="Creating extractive summary. This might take a few seconds ...")
56
+ ext_model = Summarizer()
57
+ summarized_text = ext_model(inp_text, num_sentences=5)
58
 
59
  elif summarize_type == "Abstractive":
60
+ with st.spinner(text="Creating abstractive summary. This might take a few seconds ...")
61
+ abs_model = load_abs_model()
62
+ summarized_text = abstractive_summarizer(inp_text, model=abs_model)
63
 
64
  # final summarized output
65
  st.subheader("Summarized text")