Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -5,13 +5,15 @@ summarizer = pipeline('summarization')
|
|
| 5 |
|
| 6 |
st.title("Text Summarization")
|
| 7 |
st.write("""##### This demo summarizes a given text. :sunglasses:""")
|
| 8 |
-
text = st.text_area('Enter some text
|
| 9 |
|
| 10 |
-
result = st.button("
|
| 11 |
-
|
| 12 |
-
|
| 13 |
-
|
| 14 |
-
|
| 15 |
-
|
| 16 |
-
|
| 17 |
-
|
|
|
|
|
|
|
|
|
| 5 |
|
| 6 |
st.title("Text Summarization")
|
| 7 |
st.write("""##### This demo summarizes a given text. :sunglasses:""")
|
| 8 |
+
text = st.text_area('Enter some text below')
|
| 9 |
|
| 10 |
+
result = st.button("Summarize")
|
| 11 |
+
|
| 12 |
+
with st.spinner("Generating Summary.."):
|
| 13 |
+
if text and result:
|
| 14 |
+
output = summarizer(text)
|
| 15 |
+
st.write(output)
|
| 16 |
+
st.success('Nice one, you can enter another text!', icon="✅")
|
| 17 |
+
st.balloons()
|
| 18 |
+
else:
|
| 19 |
+
st.error("You did not enter a text", icon="🚨")
|