Spaces:
Sleeping
Sleeping
File size: 1,391 Bytes
d9579cb |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 |
import streamlit as st
from textSFunctionality import generateText
# Set the page configuration and theme once at the top
st.set_page_config(page_title="Text Summarization", page_icon="⭐")
st.write(
"""
<style>
.reportview-container {
background-color: #f8f9fa;
}
.sidebar .sidebar-content {
background-color: #f0f2f6;
}
h1 {
color: #0cdec0;
}
.stButton > button {
background-color: #38d6c0; /* Lighter teal shade */
color: black;
font-weight: bold;
transition: background-color 0.3s, color 0.3s;
}
.stButton > button:hover {
background-color: #01947f; /* Even lighter teal for hover */
color: white; /* Change text color on hover */
}
.stTextArea > textarea {
background-color: #ffffff;
color: #333;
}
</style>
""", unsafe_allow_html=True
)
def main():
st.title('Text Summarization')
# Text area for user input
user_input = st.text_area("#### **Enter Text To Summarize**:", height=300)
# Button to trigger summarization
if st.button("Summarize"):
if user_input:
summary = generateText(user_input)
st.write("#### **Summarized Text**:")
st.write(summary)
else:
st.write("Please Enter Some Text To Summarize.")
if __name__ == '__main__':
main()
|