Spaces:
Runtime error
Runtime error
Update app.py
Browse files
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 |
-
|
| 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 |
-
|
| 55 |
-
|
| 56 |
-
|
|
|
|
| 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 |
|