Spaces:
Runtime error
Runtime error
add spinner message
Browse files
app.py
CHANGED
@@ -52,12 +52,14 @@ if __name__ == "__main__":
|
|
52 |
if summarize_type == "Extractive":
|
53 |
# extractive summarizer
|
54 |
|
55 |
-
|
56 |
-
|
|
|
57 |
|
58 |
elif summarize_type == "Abstractive":
|
59 |
-
|
60 |
-
|
|
|
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")
|