Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -5,25 +5,18 @@ from transformers import pipeline
|
|
5 |
import streamlit as st
|
6 |
summarizer = pipeline("summarization", model="google/bigbird-pegasus-large-bigpatent"
|
7 |
|
|
|
8 |
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
st.markdown("This is a Web application that Summarizes Text π")
|
13 |
-
text=st.text_area('Enter Text')
|
14 |
|
15 |
|
16 |
-
|
17 |
|
18 |
# Check to see if a file has been uploaded
|
19 |
-
|
20 |
-
|
21 |
# If it has then do the following:
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
if __name__ == "__main__":
|
29 |
-
app()
|
|
|
5 |
import streamlit as st
|
6 |
summarizer = pipeline("summarization", model="google/bigbird-pegasus-large-bigpatent"
|
7 |
|
8 |
+
st.title("Text Summarization π€")
|
9 |
|
10 |
+
st.markdown("This is a Web application that Summarizes Text π")
|
11 |
+
text=st.text_area('Enter Text')
|
|
|
|
|
|
|
12 |
|
13 |
|
14 |
+
summarize = st.button("Summarize")
|
15 |
|
16 |
# Check to see if a file has been uploaded
|
17 |
+
if summarize:
|
18 |
+
st.success("Summarizing Text, Please wait...")
|
19 |
# If it has then do the following:
|
20 |
+
result=summarizer(text,min_length=100, max_length=400)
|
21 |
+
st.header(result)
|
22 |
+
|
|
|
|
|
|
|
|
|
|