ML1 / pages /Natural_Language_Processing.py
Sreeja6600's picture
Update pages/Natural_Language_Processing.py
06c733a verified
import streamlit as st
import pandas as pd
custom_css = """
<style>
html, body, [data-testid="stAppViewContainer"] {
background: linear-gradient(
rgba(255, 182, 193, 0.8), /* Soft Pink */
rgba(230, 230, 255, 0.8) /* Lavender */
),
url('https://i.imgur.com/vIszbgs.jpeg') no-repeat center center fixed;
background-size: cover; /* Cover the entire screen */
font-family: Arial, sans-serif;
color: #333333; /* Set text color to dark grey for better readability */
}
h1 {
color:#2c3e50;
text-align: center;
font-size: 3rem; /* Increase font size for the main title */
margin-top: 20px;
text-shadow: 1px 1px 3px rgba(255, 255, 255, 0.8); /* Add shadow for better visibility */
}
.section {
margin: 20px auto;
padding: 20px;
background: rgba(255, 255, 255, 0.9); /* Soft white background */
border-radius: 10px;
box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1); /* Light shadow for styling */
}
.section h2 {
color: #8A2BE2; /* Blue-violet */
margin-bottom: 10px;
font-size: 2rem; /* Increase font size for section titles */
text-shadow: 1px 1px 2px rgba(255, 255, 255, 0.6); /* Light shadow for better visibility */
}
.section p, .section ul li {
font-size: 1.2rem; /* Increase font size for body text */
line-height: 1.8; /* Add more spacing between lines for better readability */
}
/* Style for the table */
.stTable {
border: 1px solid #8A2BE2 !important; /* Blue-violet border for the table */
border-radius: 10px; /* Rounded corners for the table */
color: #333333 !important; /* Dark text for table */
font-size: 1.2rem; /* Increase font size for table text */
line-height: 1.8; /* Add spacing between lines */
}
</style>
"""
# Apply custom CSS
st.markdown(custom_css, unsafe_allow_html=True)
st.markdown("""
<style>
/* Set a soft background color */
body {
background-color: #eef2f7;
}
/* Style for main title */
h1 {
color: black;
font-family: 'Roboto', sans-serif;
font-weight: 700;
text-align: center;
margin-bottom: 25px;
}
/* Style for headers */
h2 {
color: black;
font-family: 'Roboto', sans-serif;
font-weight: 600;
margin-top: 30px;
}
/* Style for subheaders */
h3 {
color: red;
font-family: 'Roboto', sans-serif;
font-weight: 500;
margin-top: 20px;
}
.custom-subheader {
color: black;
font-family: 'Roboto', sans-serif;
font-weight: 600;
margin-bottom: 15px;
}
/* Paragraph styling */
p {
font-family: 'Georgia', serif;
line-height: 1.8;
color: black;
margin-bottom: 20px;
}
/* List styling with checkmark bullets */
.icon-bullet {
list-style-type: none;
padding-left: 20px;
}
.icon-bullet li {
font-family: 'Georgia', serif;
font-size: 1.1em;
margin-bottom: 10px;
color: black;
}
.icon-bullet li::before {
content: "◆";
padding-right: 10px;
color: black;
}
/* Sidebar styling */
.sidebar .sidebar-content {
background-color: #ffffff;
border-radius: 10px;
padding: 15px;
}
.sidebar h2 {
color: #495057;
}
/* Custom button style */
.streamlit-button {
background-color: #00FFFF;
color: #000000;
font-weight: bold;
}
</style>
""", unsafe_allow_html=True)
def main():
st.title("**Natural Language Processing**")
st.header("**Text💬**")
st.markdown('''
- To represent text in numerical format and tabular format
''')
st.markdown('''
- Text is going to to use a field known as NLP(Natural Language Processing)
- It is a sub-field in AI which guide the machine to process and analyze the natural language
''')
st.subheader("**Natural Language Processing**")
st.markdown('''
- Programming language which is used to guide machine to understand and analyze the natural language
''')
if st.button("Explore More"):
#st.markdown(
# '<a href="https://huggingface.co/spaces/Harika22/Natural_Language_Processing">Click here to explore!</a>',
#unsafe_allow_html=True,
#)
"click here to explore!"
if __name__ == "__main__":
main()