Spaces:
Sleeping
Sleeping
Pavani2704
commited on
Commit
•
991d32c
1
Parent(s):
bfb2729
Update app.py
Browse files
app.py
CHANGED
@@ -14,12 +14,12 @@ option = st.sidebar.selectbox(
|
|
14 |
if option == "Summarization":
|
15 |
st.title("Text Summarization")
|
16 |
text = st.text_area("Enter text to summarize")
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
|
24 |
else:
|
25 |
st.title("None")
|
|
|
14 |
if option == "Summarization":
|
15 |
st.title("Text Summarization")
|
16 |
text = st.text_area("Enter text to summarize")
|
17 |
+
if st.button("Summarize"):
|
18 |
+
if text:
|
19 |
+
summary = summarizer(text)[0]["summary_text"]
|
20 |
+
st.write("Summary:", summary)
|
21 |
+
else:
|
22 |
+
st.write("Please enter text to summarize.")
|
23 |
|
24 |
else:
|
25 |
st.title("None")
|