Wisdom882 commited on
Commit
6a83f75
·
1 Parent(s): 374fb47

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +11 -9
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 in the box below!')
9
 
10
- result = st.button("or click here")
11
- if text or result:
12
- output = summarizer(text)
13
- st.table(output)
14
- st.success('Nice one, you can enter another text!', icon="✅")
15
- st.balloons()
16
- else:
17
- st.error("You did not enter a text", icon="🚨")
 
 
 
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="🚨")