Natural_Language_Processing / pages /2Life Cycle of NLP.py
LakshmiHarika's picture
Rename pages/2.Life Cycle of NLP.py to pages/2Life Cycle of NLP.py
b14d42e verified
import streamlit as st
import streamlit as st
st.markdown(
"""
<style>
body {
background-color: #f9f9f9; /* Light gray background */
font-family: 'Arial', sans-serif;
}
@keyframes fadeIn {
0% { opacity: 0; transform: translateY(-20px); }
100% { opacity: 1; transform: translateY(0); }
}
.title {
text-align: center;
color: black
font-size: 3rem;
font-weight: bold;
animation: fadeIn 1s ease-in-out;
}
.caption {
text-align: center;
font-style: italic;
font-size: 1.2rem;
color: black
animation: fadeIn 1.5s ease-in-out;
}
.section {
font-size: 1.1rem;
text-align: justify;
line-height: 1.8;
color: #34495e; /* Muted gray */
background: #ffffff; /* White card-style background */
padding: 20px;
border-radius: 10px;
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
animation: fadeIn 2s ease-in-out;
margin: 10px 0;
}
.image-container {
text-align: center;
margin: 20px 0;
animation: fadeIn 2.5s ease-in-out;
}
.image-container img {
border-radius: 15px;
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
transition: transform 0.3s ease-in-out;
}
.image-container img:hover {
transform: scale(1.05); /* Subtle zoom effect */
}
.sidebar {
width: 200px;
}
</style>
""",
unsafe_allow_html=True,
)
st.sidebar.title("NLP Life Cycle Navigation")
step = st.sidebar.radio("Choose a step in NLP Life Cycle",
("Problem Statement", "Data Collection", "Simple EDA", "Data Pre-processing", "EDA",
"Feature Engineering", "Training", "Testing", "Deployment/Monitoring"))
st.title("**Life Cycle of NLP**")
st.caption("Navigating the journey of NLP from start to deployment!...")
st.markdown(
"""
<div class='image-container'>
<img src="https://cdn-uploads.huggingface.co/production/uploads/66bde9bf3c885d04498227a0/5NnNw23wcvLOTXpNGCqbF.png" alt="NLP Image">
</div>
""",
unsafe_allow_html=True,
)
if step == "Problem Statement":
st.markdown("<div class='section'><b>Problem Statement</b><br>Every NLP project begins by identifying the problem that needs solving. It could range from sentiment analysis to machine translation, based on the requirements.</div>", unsafe_allow_html=True)
elif step == "Data Collection":
st.markdown("<div class='section'><b>Data Collection</b><br>The next step is to gather relevant text data from various sources such as servers, web-scrapping(text).</div>", unsafe_allow_html=True)
elif step == "Simple EDA":
st.markdown("<div class='section'><b>Simple EDA</b><br>Before diving deep into modeling, it's crucial to understand the data. Simple EDA gives the quality of the collected text data.</div>", unsafe_allow_html=True)
elif step == "Data Pre-processing":
st.markdown("<div class='section'><b>Data Pre-processing</b><br>Pre-processing includes cleaning the data and pre-processing using different techniques based on the problem statement.</div>", unsafe_allow_html=True)
elif step == "EDA":
st.markdown("<div class='section'><b>EDA (Exploratory Data Analysis)</b><br>In this deeper phase of EDA, visualizations like word clouds, bar plots, and heatmaps are created to gain insights into the data. Identifying correlations, trends, and outliers is crucial here.</div>", unsafe_allow_html=True)
elif step == "Feature Engineering":
st.markdown("<div class='section'><b>Feature Engineering</b><br>Feature engineering involves creating new features or transforming existing ones to better represent the data for machine learning models.Convert text into numerical format(**Vectorization**)</div>", unsafe_allow_html=True)
elif step == "Training":
st.markdown("<div class='section'><b>Training</b><br>The model is trained using the pre-processed data.</div>", unsafe_allow_html=True)
elif step == "Testing":
st.markdown("<div class='section'><b>Testing</b><br>After training, the model is evaluated on a separate test dataset.</div>", unsafe_allow_html=True)
elif step == "Deployment/Monitoring":
st.markdown("<div class='section'><b>Deployment and Monitoring</b><br>Once the model is trained and tested, it is deployed into a real-world environment. Continuous monitoring is needed to ensure the model performs well over time, especially as new data comes in.</div>", unsafe_allow_html=True)