Moran commited on
Commit
ccfd87d
·
1 Parent(s): 3d25071

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -4
app.py CHANGED
@@ -19,7 +19,7 @@ def textrank(corpus, ratio=0.2):
19
  #end textrank
20
 
21
  def start_summarize(long_text, model):
22
- start = False
23
  num_of_sentences = len(sent_tokenize(long_text))
24
  if num_of_sentences > 4:
25
  if model=="RankText":
@@ -51,9 +51,10 @@ start = st.button('Summarize')#, on_click=start_summarize, args=(user_text, mode
51
  # args=(increment_value, ))
52
 
53
  if start:
54
- st.markdown("Summary")
55
- start_summarize(user_text, model_type)
56
- st.spinner('We are summarizing your text...')
 
57
  # time.sleep(10)
58
 
59
 
 
19
  #end textrank
20
 
21
  def start_summarize(long_text, model):
22
+
23
  num_of_sentences = len(sent_tokenize(long_text))
24
  if num_of_sentences > 4:
25
  if model=="RankText":
 
51
  # args=(increment_value, ))
52
 
53
  if start:
54
+ start = False
55
+ st.markdown("Summary")
56
+ start_summarize(user_text, model_type)
57
+ st.spinner('We are summarizing your text...')
58
  # time.sleep(10)
59
 
60