Commit
·
785ddb0
1
Parent(s):
0934e7e
Update app.py
Browse files
app.py
CHANGED
|
@@ -2,8 +2,8 @@ import streamlit as st
|
|
| 2 |
from transformers import pipeline
|
| 3 |
|
| 4 |
|
| 5 |
-
st.title("Text Summarization App
|
| 6 |
-
|
| 7 |
# Create a text input widget
|
| 8 |
text_input = st.text_area(label="Input Text", height=200)
|
| 9 |
generated_summary = ""
|
|
@@ -20,10 +20,9 @@ def generate_summary(text):
|
|
| 20 |
generate_button = st.button(label="Generate Summary")
|
| 21 |
if generate_button:
|
| 22 |
# Call the generate_summary function when the button is clicked
|
| 23 |
-
generated_summary = generate_summary(text_input
|
| 24 |
st.success("Summary Generated!")
|
| 25 |
-
|
| 26 |
-
st.warning("Please enter some text in the input field above.")
|
| 27 |
|
| 28 |
# Display the generated summary
|
| 29 |
st.markdown("## Summary")
|
|
|
|
| 2 |
from transformers import pipeline
|
| 3 |
|
| 4 |
|
| 5 |
+
st.title("Text Summarization App PEGASUS-Large) ")
|
| 6 |
+
st.subheader('Input text below to be summarised', divider='rainbow')
|
| 7 |
# Create a text input widget
|
| 8 |
text_input = st.text_area(label="Input Text", height=200)
|
| 9 |
generated_summary = ""
|
|
|
|
| 20 |
generate_button = st.button(label="Generate Summary")
|
| 21 |
if generate_button:
|
| 22 |
# Call the generate_summary function when the button is clicked
|
| 23 |
+
generated_summary = generate_summary(text_input)
|
| 24 |
st.success("Summary Generated!")
|
| 25 |
+
|
|
|
|
| 26 |
|
| 27 |
# Display the generated summary
|
| 28 |
st.markdown("## Summary")
|