sahibnanda's picture
commit
d9579cb
raw
history blame
No virus
1.39 kB
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()