Wisdom882 commited on
Commit
1398a8f
·
1 Parent(s): 1f5e4a0

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +16 -1
app.py CHANGED
@@ -1,2 +1,17 @@
1
  import streamlit as st
2
- from transformers import pipeline
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  import streamlit as st
2
+ from transformers import pipeline
3
+
4
+ pipe = 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
+ out = pipe(text)
13
+ st.table(out)
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="🚨"