Spaces:
Build error
Build error
import streamlit as st | |
from streamlit_lottie import st_lottie | |
import requests | |
import importlib.util | |
import os | |
# Function to load Lottie animation from a URL | |
def load_lottieurl(url: str): | |
"""Fetch Lottie animation JSON from a URL.""" | |
try: | |
response = requests.get(url) | |
if response.status_code == 200: | |
return response.json() | |
except requests.exceptions.RequestException: | |
return None | |
# CSS Styling for adaptive light/dark modes | |
st.markdown(""" | |
<style> | |
:root { | |
--background-color: #f8f9fa; | |
--text-color: #212529; | |
--primary-color: #007acc; | |
--secondary-color: #005b96; | |
--card-bg: #ffffff; | |
--text-muted: #6c757d; | |
} | |
@media (prefers-color-scheme: dark) { | |
:root { | |
--background-color: #0e1117; | |
--text-color: #e5e5e5; | |
--primary-color: #29b6f6; | |
--secondary-color: #90caf9; | |
--card-bg: #1f2937; | |
--text-muted: #a3a3a3; | |
} | |
} | |
body { margin: 0; padding: 0; font-family: 'Roboto', sans-serif; background-color: var(--background-color) !important; color: var(--text-color) !important; } | |
h1 { font-size: 3rem; color: var(--primary-color) !important; text-align: center; margin-bottom: 15px; } | |
h2, h3 { font-size: 1.5rem; color: var(--secondary-color) !important; text-align: center; margin-top: 20px; } | |
p { font-family: 'Georgia', serif; color: var(--text-color) !important; line-height: 1.6; text-align: justify; } | |
.about-author { background-color: var(--card-bg) !important; border-radius: 10px; padding: 25px; box-shadow: 0 4px 6px rgba(0,0,0,0.1); margin: 20px auto; max-width: 700px; text-align: center; color: var(--text-color) !important; } | |
.social-icons { display: flex; justify-content: center; gap: 20px; margin-top: 15px; } | |
.social-icons a img { width: 40px; height: 40px; transition: transform 0.3s ease-in-out; } | |
.social-icons a img:hover { transform: scale(1.2); } | |
footer { margin-top: 50px; text-align: center; font-family: 'Georgia', serif; color: var(--text-muted) !important; } | |
.css-1d391kg, .css-1d391kg * { background-color: var(--card-bg) !important; color: var(--text-color) !important; } | |
</style> | |
""", unsafe_allow_html=True) | |
# Sidebar Navigation | |
chapters = [ | |
"Foundation", | |
"ML Project Lifecycle", | |
"Core Algorithms", | |
"Model Evaluation", | |
"Data Handling", | |
"Computer Vision Basics", | |
"Natural Language Processing (NLP)", | |
"Deployment & Tools" | |
] | |
chapter = st.sidebar.radio("Chapter", chapters) | |
# Nested page selection based on chapter | |
page = None | |
if chapter == "Foundation": | |
page = st.sidebar.radio("Page", ["Home", "Introduction to Data Science", "Machine Learning vs Deep Learning"]) | |
elif chapter == "ML Project Lifecycle": | |
section = st.sidebar.radio("Section", ["Life Cycle of ML Project"]) | |
if section: | |
page = st.sidebar.radio("Subtopic", [ | |
"Problem Statement", "Data Collection", "Data Preprocessing", | |
"Exploratory Data Analysis (EDA)", "Feature Engineering", "Model Selection", | |
"Model Training", "Model Evaluation & Tuning", "Model Deployment", "Monitoring" | |
]) | |
elif chapter == "Core Algorithms": | |
page = st.sidebar.radio("Page", [ | |
"Linear Regression", "Logistic Regression", "k-Nearest Neighbors (kNN)", | |
"Decision Trees", "Support Vector Machines (SVM)", "Ensemble Techniques" | |
]) | |
elif chapter == "Model Evaluation": | |
page = st.sidebar.radio("Page", ["Performance Metrics"]) | |
if page == "Performance Metrics": | |
page = st.sidebar.radio("Metric", ["Accuracy, Precision, Recall", "Confusion Matrix", "ROC-AUC"]) | |
elif chapter == "Data Handling": | |
page = st.sidebar.radio("Page", ["Data Types", "Data Cleaning", "Feature Engineering"]) | |
if page == "Data Types": | |
page = st.sidebar.radio("Type", ["Structured Data (SQL, Excel)", "Semi-Structured Data (JSON, XML)", "Unstructured Data (Images, Text)"]) | |
elif chapter == "Computer Vision Basics": | |
page = st.sidebar.radio("Page", ["Image Processing", "OpenCV Basics"]) | |
if page == "Image Processing": | |
page = st.sidebar.radio("Topic", ["Color Spaces", "Image Augmentation", "Splitting/Merging Images"]) | |
elif chapter == "Natural Language Processing (NLP)": | |
page = st.sidebar.radio("Page", ["NLP Introduction", "Text Preprocessing"]) | |
elif chapter == "Deployment & Tools": | |
page = st.sidebar.radio("Page", ["Model Deployment", "Working with Excel/CSV", "SQL for Data Science"]) | |
# Map pages to external scripts | |
page_to_script = { | |
"Introduction to Data Science": "01_introduction.py", | |
"Machine Learning vs Deep Learning": "02_ml_vs_dl.py", | |
"Life Cycle of ML Project": "03_life_cycle_of_ml_project.py", | |
"Data Handling": "04_data.py" | |
} | |
# Helper to load and execute a module from path | |
def run_script(path, func_name=None, *args): | |
full_path = os.path.join(os.path.dirname(__file__), path) | |
spec = importlib.util.spec_from_file_location(path, full_path) | |
module = importlib.util.module_from_spec(spec) | |
spec.loader.exec_module(module) | |
if func_name: | |
getattr(module, func_name)(*args) | |
# Content rendering | |
if page == "Home": | |
# existing Home content | |
st.title("Mastering Machine Learning: From Basics To Brilliance ππ€") | |
st.markdown("## Your Gateway To Become Master In Data Science") | |
anim = load_lottieurl("https://lottie.host/a45f4739-ef78-4193-b3f9-2ea435a190d5/PsTVRgXekn.json") | |
if anim: | |
st_lottie(anim, height=200) | |
st.subheader("About This Application") | |
st.markdown(""" | |
This platform serves as a **comprehensive guide to Machine Learning and Data Science**. | |
From grasping the fundamentals to deploying models, it offers insights into the entire lifecycle: | |
- **Problem Definition**: Understand context and objectives. | |
- **Data Handling**: Collect, clean, explore. | |
- **Model Development**: Build and optimize. | |
- **Model Deployment**: Deliver and monitor solutions. | |
""") | |
st.subheader("What You'll Learn Here") | |
st.markdown(""" | |
1. **Roadmaps**: Navigate challenges step-by-step. | |
2. **Hands-on Projects**: Applied examples. | |
3. **Visualizations**: Intuitive graphs. | |
4. **Insights**: Lessons from experience. | |
""") | |
st.markdown(""" | |
<div class='about-author'> | |
<h2>About the Author</h2> | |
<p>Hello! I'm <strong>Yash Harish Gupta</strong>, an aspiring data scientist passionate about ML.</p> | |
</div> | |
""", unsafe_allow_html=True) | |
st.markdown(""" | |
<div class='social-icons'> | |
<a href='https://www.linkedin.com/in/yash-harish-gupta-71b011189/' target='_blank'> | |
<img src='https://upload.wikimedia.org/wikipedia/commons/c/ca/LinkedIn_logo_initials.png' alt='LinkedIn'> | |
</a> | |
<a href='https://github.com/YashGupta018' target='_blank'> | |
<img src='https://github.githubassets.com/images/modules/logos_page/GitHub-Mark.png' alt='GitHub'> | |
</a> | |
</div> | |
<footer>Made with β€οΈ by <strong>Yash Harish Gupta</strong> | Β© 2024</footer> | |
""", unsafe_allow_html=True) | |
elif page in page_to_script: | |
script = page_to_script[page] | |
# call appropriate function if needed | |
if page == "Introduction to Data Science": | |
run_script(script, "show_content", "Introduction") | |
elif page == "Machine Learning vs Deep Learning": | |
run_script(script) # top-level execution handles its own nav | |
elif page == "Life Cycle of ML Project": | |
run_script(script, "draw_lifecycle_diagram") | |
elif page == "Data Handling": | |
run_script(script, "main") | |
else: | |
# default placeholder for other pages | |
st.header(page or chapter) | |
st.write("Content for this page will go here.") | |
# ---------------------------------------------------------------------------------------------------------------------------------------------------------- | |
# import streamlit as st | |
# from streamlit_lottie import st_lottie | |
# import requests | |
# # Function to load Lottie animation from a URL | |
# def load_lottieurl(url: str): | |
# """Fetch Lottie animation JSON from a URL.""" | |
# try: | |
# response = requests.get(url) | |
# if response.status_code == 200: | |
# return response.json() | |
# except requests.exceptions.RequestException: | |
# return None | |
# # CSS Styling for adaptive light/dark modes | |
# st.markdown(""" | |
# <style> | |
# :root { | |
# --background-color: #f8f9fa; | |
# --text-color: #212529; | |
# --primary-color: #007acc; | |
# --secondary-color: #005b96; | |
# --card-bg: #ffffff; | |
# --text-muted: #6c757d; | |
# } | |
# @media (prefers-color-scheme: dark) { | |
# :root { | |
# --background-color: #0e1117; | |
# --text-color: #e5e5e5; | |
# --primary-color: #29b6f6; | |
# --secondary-color: #90caf9; | |
# --card-bg: #1f2937; | |
# --text-muted: #a3a3a3; | |
# } | |
# } | |
# body { | |
# margin: 0; | |
# padding: 0; | |
# font-family: 'Roboto', sans-serif; | |
# background-color: var(--background-color) !important; | |
# color: var(--text-color) !important; | |
# } | |
# h1 { font-size: 3rem; color: var(--primary-color) !important; text-align: center; margin-bottom: 15px; } | |
# h2, h3 { font-size: 1.5rem; color: var(--secondary-color) !important; text-align: center; margin-top: 20px; } | |
# p { font-family: 'Georgia', serif; color: var(--text-color) !important; line-height: 1.6; text-align: justify; } | |
# .about-author { background-color: var(--card-bg) !important; border-radius: 10px; padding: 25px; | |
# box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1); margin: 20px auto; max-width: 700px; text-align: center; | |
# color: var(--text-color) !important; } | |
# .social-icons { display: flex; justify-content: center; gap: 20px; margin-top: 15px; } | |
# .social-icons a img { width: 40px; height: 40px; transition: transform 0.3s ease-in-out; } | |
# .social-icons a img:hover { transform: scale(1.2); } | |
# footer { margin-top: 50px; text-align: center; font-family: 'Georgia', serif; color: var(--text-muted) !important; } | |
# .css-1d391kg, .css-1d391kg * { background-color: var(--card-bg) !important; color: var(--text-color) !important; } | |
# </style> | |
# """, unsafe_allow_html=True) | |
# # Sidebar Navigation | |
# episodes = [ | |
# "Foundation", | |
# "ML Project Lifecycle", | |
# "Core Algorithms", | |
# "Model Evaluation", | |
# "Data Handling", | |
# "Computer Vision Basics", | |
# "Natural Language Processing (NLP)", | |
# "Deployment & Tools" | |
# ] | |
# chapter = st.sidebar.radio("Chapter", episodes) | |
# # Initialize page variables | |
# page = None | |
# if chapter == "Foundation": | |
# page = st.sidebar.radio("Page", ["Home", "Introduction to Data Science", "Machine Learning vs Deep Learning"]) | |
# elif chapter == "ML Project Lifecycle": | |
# section = st.sidebar.radio("Section", ["Life Cycle of ML Project"]) | |
# if section: | |
# page = st.sidebar.radio("Subtopic", [ | |
# "Problem Statement", "Data Collection", "Data Preprocessing", | |
# "Exploratory Data Analysis (EDA)", "Feature Engineering", "Model Selection", | |
# "Model Training", "Model Evaluation & Tuning", "Model Deployment", "Monitoring" | |
# ]) | |
# elif chapter == "Core Algorithms": | |
# page = st.sidebar.radio("Page", [ | |
# "Linear Regression", "Logistic Regression", "k-Nearest Neighbors (kNN)", | |
# "Decision Trees", "Support Vector Machines (SVM)", "Ensemble Techniques" | |
# ]) | |
# elif chapter == "Model Evaluation": | |
# page = st.sidebar.radio("Page", ["Performance Metrics"]) | |
# if page == "Performance Metrics": | |
# page = st.sidebar.radio("Metric", ["Accuracy, Precision, Recall", "Confusion Matrix", "ROC-AUC"]) | |
# elif chapter == "Data Handling": | |
# page = st.sidebar.radio("Page", ["Data Types", "Data Cleaning", "Feature Engineering"]) | |
# if page == "Data Types": | |
# page = st.sidebar.radio("Type", ["Structured Data (SQL, Excel)", "Semi-Structured Data (JSON, XML)", "Unstructured Data (Images, Text)"]) | |
# elif chapter == "Computer Vision Basics": | |
# page = st.sidebar.radio("Page", ["Image Processing", "OpenCV Basics"]) | |
# if page == "Image Processing": | |
# page = st.sidebar.radio("Topic", ["Color Spaces", "Image Augmentation", "Splitting/Merging Images"]) | |
# elif chapter == "Natural Language Processing (NLP)": | |
# page = st.sidebar.radio("Page", ["NLP Introduction", "Text Preprocessing"]) | |
# elif chapter == "Deployment & Tools": | |
# page = st.sidebar.radio("Page", ["Model Deployment", "Working with Excel/CSV", "SQL for Data Science"]) | |
# # Content rendering based on selection | |
# if page == "Home": | |
# st.title("Mastering Machine Learning: From Basics To Brilliance ππ€") | |
# st.markdown("## Your Gateway To Become Master In Data Science") | |
# anim = load_lottieurl("https://lottie.host/a45f4739-ef78-4193-b3f9-2ea435a190d5/PsTVRgXekn.json") | |
# if anim: | |
# st_lottie(anim, height=200) | |
# st.subheader("About This Application") | |
# st.markdown(""" | |
# This platform serves as a **comprehensive guide to Machine Learning and Data Science**. | |
# From grasping the fundamentals to deploying models, it offers insights into the entire lifecycle: | |
# - **Problem Definition**: Understand context and objectives. | |
# - **Data Handling**: Collect, clean, explore. | |
# - **Model Development**: Build and optimize. | |
# - **Model Deployment**: Deliver and monitor solutions. | |
# """) | |
# st.subheader("What You'll Learn Here") | |
# st.markdown(""" | |
# 1. **Roadmaps**: Navigate challenges step-by-step. | |
# 2. **Hands-on Projects**: Applied examples. | |
# 3. **Visualizations**: Intuitive graphs. | |
# 4. **Insights**: Lessons from experience. | |
# """) | |
# st.markdown(""" | |
# <div class='about-author'> | |
# <h2>About the Author</h2> | |
# <p>Hello! I'm <strong>Yash Harish Gupta</strong>, an aspiring data scientist passionate about ML.</p> | |
# </div> | |
# """, unsafe_allow_html=True) | |
# st.markdown(""" | |
# <div class='social-icons'> | |
# <a href='https://www.linkedin.com/in/yash-harish-gupta-71b011189/' target='_blank'> | |
# <img src='https://upload.wikimedia.org/wikipedia/commons/c/ca/LinkedIn_logo_initials.png' alt='LinkedIn'> | |
# </a> | |
# <a href='https://github.com/YashGupta018' target='_blank'> | |
# <img src='https://github.githubassets.com/images/modules/logos_page/GitHub-Mark.png' alt='GitHub'> | |
# </a> | |
# </div> | |
# <footer>Made with β€οΈ by <strong>Yash Harish Gupta</strong> | Β© 2024</footer> | |
# """, unsafe_allow_html=True) | |
# else: | |
# st.header(page or chapter) | |
# st.write("Content for this page will go here.") | |
# ---------------------------------------------------------------------------------------------------------------------------------------------------------- | |
# import streamlit as st | |
# from streamlit_lottie import st_lottie | |
# import requests | |
# # Function to load Lottie animation from a URL | |
# def load_lottieurl(url: str): | |
# """Fetch Lottie animation JSON from a URL.""" | |
# try: | |
# response = requests.get(url) | |
# if response.status_code == 200: | |
# return response.json() | |
# except requests.exceptions.RequestException: | |
# return None | |
# # CSS Styling for light and dark modes with adaptive theme support | |
# st.markdown(""" | |
# <style> | |
# :root { | |
# --background-color: #f8f9fa; | |
# --text-color: #212529; | |
# --primary-color: #007acc; | |
# --secondary-color: #005b96; | |
# --card-bg: #ffffff; | |
# --text-muted: #6c757d; | |
# } | |
# @media (prefers-color-scheme: dark) { | |
# :root { | |
# --background-color: #0e1117; | |
# --text-color: #e5e5e5; | |
# --primary-color: #29b6f6; | |
# --secondary-color: #90caf9; | |
# --card-bg: #1f2937; | |
# --text-muted: #a3a3a3; | |
# } | |
# } | |
# body { | |
# margin: 0; | |
# padding: 0; | |
# font-family: 'Roboto', sans-serif; | |
# background-color: var(--background-color) !important; | |
# color: var(--text-color) !important; | |
# } | |
# h1 { | |
# font-size: 3rem; | |
# color: var(--primary-color) !important; | |
# text-align: center; | |
# margin-bottom: 15px; | |
# } | |
# h2, h3 { | |
# font-size: 1.5rem; | |
# color: var(--secondary-color) !important; | |
# text-align: center; | |
# margin-top: 20px; | |
# } | |
# p { | |
# font-family: 'Georgia', serif; | |
# color: var(--text-color) !important; | |
# line-height: 1.6; | |
# text-align: justify; | |
# } | |
# .about-author { | |
# background-color: var(--card-bg) !important; | |
# border-radius: 10px; | |
# padding: 25px; | |
# box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1); | |
# margin: 20px auto; | |
# max-width: 700px; | |
# text-align: center; | |
# color: var(--text-color) !important; | |
# } | |
# .social-icons { | |
# display: flex; | |
# justify-content: center; | |
# gap: 20px; | |
# margin-top: 15px; | |
# } | |
# .social-icons a img { | |
# width: 40px; | |
# height: 40px; | |
# transition: transform 0.3s ease-in-out; | |
# } | |
# .social-icons a img:hover { | |
# transform: scale(1.2); | |
# } | |
# footer { | |
# margin-top: 50px; | |
# text-align: center; | |
# font-family: 'Georgia', serif; | |
# color: var(--text-muted) !important; | |
# } | |
# /* Sidebar adjustments */ | |
# .css-1d391kg, .css-1d391kg * { | |
# background-color: var(--card-bg) !important; | |
# color: var(--text-color) !important; | |
# } | |
# </style> | |
# """, unsafe_allow_html=True) | |
# # Sidebar Navigation | |
# chapters = [ | |
# "Foundation", | |
# "ML Project Lifecycle", | |
# "Core Algorithms", | |
# "Model Evaluation", | |
# "Data Handling", | |
# "Computer Vision Basics", | |
# "Natural Language Processing (NLP)", | |
# "Deployment & Tools" | |
# ] | |
# selected_chapter = st.sidebar.radio("Select Chapter", chapters) | |
# # Nested page selection based on chapter | |
# if selected_chapter == "Foundation": | |
# page = st.sidebar.radio("Select Page", [ | |
# "Home", | |
# "Introduction to Data Science", | |
# "Machine Learning vs Deep Learning" | |
# ]) | |
# elif selected_chapter == "ML Project Lifecycle": | |
# section = st.sidebar.radio("Select Section", ["Life Cycle of ML Project"]) | |
# if section: | |
# page = st.sidebar.radio("Select Subtopic", [ | |
# "Problem Statement", | |
# "Data Collection", | |
# "Data Preprocessing", | |
# "Exploratory Data Analysis (EDA)", | |
# "Feature Engineering", | |
# "Model Selection", | |
# "Model Training", | |
# "Model Evaluation & Tuning", | |
# "Model Deployment", | |
# "Monitoring" | |
# ]) | |
# elif selected_chapter == "Core Algorithms": | |
# page = st.sidebar.radio("Select Page", [ | |
# "Linear Regression", | |
# "Logistic Regression", | |
# "k-Nearest Neighbors (kNN)", | |
# "Decision Trees", | |
# "Support Vector Machines (SVM)", | |
# "Ensemble Techniques" | |
# ]) | |
# elif selected_chapter == "Model Evaluation": | |
# page = st.sidebar.radio("Select Page", ["Performance Metrics"]) | |
# if page == "Performance Metrics": | |
# metric = st.sidebar.radio("Choose Metric", [ | |
# "Accuracy, Precision, Recall", | |
# "Confusion Matrix", | |
# "ROC-AUC" | |
# ]) | |
# elif selected_chapter == "Data Handling": | |
# page = st.sidebar.radio("Select Page", [ | |
# "Data Types", | |
# "Data Cleaning", | |
# "Feature Engineering" | |
# ]) | |
# if page == "Data Types": | |
# dtype = st.sidebar.radio("Select Type", [ | |
# "Structured Data (SQL, Excel)", | |
# "Semi-Structured Data (JSON, XML)", | |
# "Unstructured Data (Images, Text)" | |
# ]) | |
# elif selected_chapter == "Computer Vision Basics": | |
# page = st.sidebar.radio("Select Page", ["Image Processing", "OpenCV Basics"]) | |
# if page == "Image Processing": | |
# iproc = st.sidebar.radio("Select Topic", [ | |
# "Color Spaces", | |
# "Image Augmentation", | |
# "Splitting/Merging Images" | |
# ]) | |
# elif selected_chapter == "Natural Language Processing (NLP)": | |
# page = st.sidebar.radio("Select Page", [ | |
# "NLP Introduction", | |
# "Text Preprocessing" | |
# ]) | |
# elif selected_chapter == "Deployment & Tools": | |
# page = st.sidebar.radio("Select Page", [ | |
# "Model Deployment", | |
# "Working with Excel/CSV", | |
# "SQL for Data Science" | |
# ]) | |
# # Title and Tagline | |
# st.title("Mastering Machine Learning: From Basics To Brilliance ππ€") | |
# st.markdown("## Your Gateway To Become Master In Data Science") | |
# # Display Lottie animation | |
# animation_url = "https://lottie.host/a45f4739-ef78-4193-b3f9-2ea435a190d5/PsTVRgXekn.json" | |
# lottie_animation = load_lottieurl(animation_url) | |
# if lottie_animation: | |
# st_lottie(lottie_animation, height=200, key="animation") | |
# # About the App Section | |
# st.subheader("About This Application") | |
# st.markdown(""" | |
# This platform serves as a **comprehensive guide to Machine Learning and Data Science**. | |
# From grasping the fundamentals to deploying models, it offers insights into the entire lifecycle: | |
# - **Problem Definition**: Understand the business context and set clear objectives. | |
# - **Data Handling**: Collect, clean, and explore datasets to uncover insights. | |
# - **Model Development**: Build and optimize machine learning models. | |
# - **Model Deployment**: Deliver real-world solutions and monitor performance. | |
# Designed for both beginners and those looking to refine their skills, this app provides a structured learning path enriched with practical examples. | |
# """) | |
# # Key Takeaways Section | |
# st.subheader("What You'll Learn Here") | |
# st.markdown(""" | |
# 1. **Step-by-Step Roadmaps**: Detailed guidance to help you navigate through data science challenges. | |
# 2. **Hands-on Projects**: Real-world examples and code snippets for applied learning. | |
# 3. **Visualizations**: Clear, intuitive graphs and plots to simplify complex concepts. | |
# 4. **Insights from Experience**: Lessons from my personal journey to help you avoid common pitfalls. | |
# """) | |
# # Author Section | |
# st.markdown(""" | |
# <div class="about-author"> | |
# <h2>About the Author</h2> | |
# <p> | |
# Hello! I'm <strong>Yash Harish Gupta</strong>, an aspiring data scientist deeply passionate about machine learning. | |
# My journey began with curiosity about how data drives decisions and has evolved into a mission to create impactful solutions. | |
# Currently, I am learning and preparing to embark on my professional career in this exciting field. | |
# </p> | |
# </div> | |
# """, unsafe_allow_html=True) | |
# # Social Links Section | |
# st.markdown(""" | |
# <div class="social-icons"> | |
# <a href="https://www.linkedin.com/in/yash-harish-gupta-71b011189/" target="_blank"> | |
# <img src="https://upload.wikimedia.org/wikipedia/commons/c/ca/LinkedIn_logo_initials.png" alt="LinkedIn"> | |
# </a> | |
# <a href="https://github.com/YashGupta018" target="_blank"> | |
# <img src="https://github.githubassets.com/images/modules/logos_page/GitHub-Mark.png" alt="GitHub"> | |
# </a> | |
# </div> | |
# """, unsafe_allow_html=True) | |
# # Footer Section | |
# st.markdown(""" | |
# <footer> | |
# <p>Made with β€οΈ by <strong>Yash Harish Gupta</strong> | Β© 2024</p> | |
# </footer> | |
# """, unsafe_allow_html=True) | |
# ----------------------------------------------------------------------------------------------------------------------------------------------------- | |
# import streamlit as st | |
# from streamlit_lottie import st_lottie | |
# import requests | |
# # Function to load Lottie animation from a URL | |
# def load_lottieurl(url: str): | |
# """Fetch Lottie animation JSON from a URL.""" | |
# try: | |
# response = requests.get(url) | |
# if response.status_code == 200: | |
# return response.json() | |
# except requests.exceptions.RequestException: | |
# return None | |
# # CSS Styling for light and dark modes | |
# st.markdown(""" | |
# <style> | |
# body { | |
# margin: 0; | |
# padding: 0; | |
# font-family: 'Roboto', sans-serif; | |
# background-color: var(--background-color, #f8f9fa); | |
# color: var(--text-color, #212529); | |
# } | |
# h1 { | |
# font-size: 3rem; | |
# color: var(--primary-color, #007acc); | |
# text-align: center; | |
# margin-bottom: 15px; | |
# } | |
# h2, h3 { | |
# font-size: 1.5rem; | |
# color: var(--secondary-color, #005b96); | |
# text-align: center; | |
# margin-top: 20px; | |
# } | |
# p { | |
# font-family: 'Georgia', serif; | |
# color: var(--text-color, #212529); | |
# line-height: 1.6; | |
# text-align: justify; | |
# } | |
# .about-author { | |
# background-color: var(--card-bg, #ffffff); | |
# border-radius: 10px; | |
# padding: 25px; | |
# box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1); | |
# margin: 20px auto; | |
# max-width: 700px; | |
# text-align: center; | |
# color: var(--text-color, #212529); | |
# } | |
# .social-icons { | |
# display: flex; | |
# justify-content: center; | |
# gap: 20px; | |
# margin-top: 15px; | |
# } | |
# .social-icons a img { | |
# width: 40px; | |
# height: 40px; | |
# transition: transform 0.3s ease-in-out; | |
# } | |
# .social-icons a img:hover { | |
# transform: scale(1.2); | |
# } | |
# footer { | |
# margin-top: 50px; | |
# text-align: center; | |
# font-family: 'Georgia', serif; | |
# color: var(--text-muted, #6c757d); | |
# } | |
# </style> | |
# """, unsafe_allow_html=True) | |
# # Sidebar Navigation | |
# chapters = [ | |
# "Foundation", | |
# "ML Project Lifecycle", | |
# "Core Algorithms", | |
# "Model Evaluation", | |
# "Data Handling", | |
# "Computer Vision Basics", | |
# "Natural Language Processing (NLP)", | |
# "Deployment & Tools" | |
# ] | |
# selected_chapter = st.sidebar.radio("Select Chapter", chapters) | |
# # Nested page selection based on chapter | |
# if selected_chapter == "Foundation": | |
# page = st.sidebar.radio("Select Page", [ | |
# "Home", | |
# "Introduction to Data Science", | |
# "Machine Learning vs Deep Learning" | |
# ]) | |
# elif selected_chapter == "ML Project Lifecycle": | |
# section = st.sidebar.radio("Select Section", ["Life Cycle of ML Project"]) | |
# if section: | |
# page = st.sidebar.radio("Select Subtopic", [ | |
# "Problem Statement", | |
# "Data Collection", | |
# "Data Preprocessing", | |
# "Exploratory Data Analysis (EDA)", | |
# "Feature Engineering", | |
# "Model Selection", | |
# "Model Training", | |
# "Model Evaluation & Tuning", | |
# "Model Deployment", | |
# "Monitoring" | |
# ]) | |
# elif selected_chapter == "Core Algorithms": | |
# page = st.sidebar.radio("Select Page", [ | |
# "Linear Regression", | |
# "Logistic Regression", | |
# "k-Nearest Neighbors (kNN)", | |
# "Decision Trees", | |
# "Support Vector Machines (SVM)", | |
# "Ensemble Techniques" | |
# ]) | |
# elif selected_chapter == "Model Evaluation": | |
# page = st.sidebar.radio("Select Page", ["Performance Metrics"]) | |
# if page == "Performance Metrics": | |
# metric = st.sidebar.radio("Choose Metric", [ | |
# "Accuracy, Precision, Recall", | |
# "Confusion Matrix", | |
# "ROC-AUC" | |
# ]) | |
# elif selected_chapter == "Data Handling": | |
# page = st.sidebar.radio("Select Page", [ | |
# "Data Types", | |
# "Data Cleaning", | |
# "Feature Engineering" | |
# ]) | |
# if page == "Data Types": | |
# dtype = st.sidebar.radio("Select Type", [ | |
# "Structured Data (SQL, Excel)", | |
# "Semi-Structured Data (JSON, XML)", | |
# "Unstructured Data (Images, Text)" | |
# ]) | |
# elif selected_chapter == "Computer Vision Basics": | |
# page = st.sidebar.radio("Select Page", ["Image Processing", "OpenCV Basics"]) | |
# if page == "Image Processing": | |
# iproc = st.sidebar.radio("Select Topic", [ | |
# "Color Spaces", | |
# "Image Augmentation", | |
# "Splitting/Merging Images" | |
# ]) | |
# elif selected_chapter == "Natural Language Processing (NLP)": | |
# page = st.sidebar.radio("Select Page", [ | |
# "NLP Introduction", | |
# "Text Preprocessing" | |
# ]) | |
# elif selected_chapter == "Deployment & Tools": | |
# page = st.sidebar.radio("Select Page", [ | |
# "Model Deployment", | |
# "Working with Excel/CSV", | |
# "SQL for Data Science" | |
# ]) | |
# # Title and Tagline | |
# st.title("Mastering Machine Learning: From Basics To Brilliance ππ€") | |
# st.markdown("## Your Gateway To Become Master In Data Science") | |
# # Display Lottie animation | |
# animation_url = "https://lottie.host/a45f4739-ef78-4193-b3f9-2ea435a190d5/PsTVRgXekn.json" | |
# lottie_animation = load_lottieurl(animation_url) | |
# if lottie_animation: | |
# st_lottie(lottie_animation, height=200, key="animation") | |
# # About the App Section | |
# st.subheader("About This Application") | |
# st.markdown(""" | |
# This platform serves as a **comprehensive guide to Machine Learning and Data Science**. | |
# From grasping the fundamentals to deploying models, it offers insights into the entire lifecycle: | |
# - **Problem Definition**: Understand the business context and set clear objectives. | |
# - **Data Handling**: Collect, clean, and explore datasets to uncover insights. | |
# - **Model Development**: Build and optimize machine learning models. | |
# - **Model Deployment**: Deliver real-world solutions and monitor performance. | |
# Designed for both beginners and those looking to refine their skills, this app provides a structured learning path enriched with practical examples. | |
# """) | |
# # Key Takeaways Section | |
# st.subheader("What You'll Learn Here") | |
# st.markdown(""" | |
# 1. **Step-by-Step Roadmaps**: Detailed guidance to help you navigate through data science challenges. | |
# 2. **Hands-on Projects**: Real-world examples and code snippets for applied learning. | |
# 3. **Visualizations**: Clear, intuitive graphs and plots to simplify complex concepts. | |
# 4. **Insights from Experience**: Lessons from my personal journey to help you avoid common pitfalls. | |
# """) | |
# # Author Section | |
# st.markdown(""" | |
# <div class="about-author"> | |
# <h2>About the Author</h2> | |
# <p> | |
# Hello! I'm <strong>Yash Harish Gupta</strong>, an aspiring data scientist deeply passionate about machine learning. | |
# My journey began with curiosity about how data drives decisions and has evolved into a mission to create impactful solutions. | |
# Currently, I am learning and preparing to embark on my professional career in this exciting field. | |
# </p> | |
# </div> | |
# """, unsafe_allow_html=True) | |
# # Social Links Section | |
# st.markdown(""" | |
# <div class="social-icons"> | |
# <a href="https://www.linkedin.com/in/yash-harish-gupta-71b011189/" target="_blank"> | |
# <img src="https://upload.wikimedia.org/wikipedia/commons/c/ca/LinkedIn_logo_initials.png" alt="LinkedIn"> | |
# </a> | |
# <a href="https://github.com/YashGupta018" target="_blank"> | |
# <img src="https://github.githubassets.com/images/modules/logos_page/GitHub-Mark.png" alt="GitHub"> | |
# </a> | |
# </div> | |
# """, unsafe_allow_html=True) | |
# # Footer Section | |
# st.markdown(""" | |
# <footer> | |
# <p>Made with β€οΈ by <strong>Yash Harish Gupta</strong> | Β© 2024</p> | |
# </footer> | |
# """, unsafe_allow_html=True) | |
# ------------------------------------------------------------------------------------------------------------------------------------------- | |
# import streamlit as st | |
# from streamlit_lottie import st_lottie | |
# import requests | |
# # Function to load Lottie animation from a URL | |
# def load_lottieurl(url: str): | |
# """Fetch Lottie animation JSON from a URL.""" | |
# try: | |
# response = requests.get(url) | |
# if response.status_code == 200: | |
# return response.json() | |
# except requests.exceptions.RequestException: | |
# return None | |
# # CSS Styling for light and dark modes | |
# st.markdown(""" | |
# <style> | |
# body { | |
# margin: 0; | |
# padding: 0; | |
# font-family: 'Roboto', sans-serif; | |
# background-color: var(--background-color, #f8f9fa); | |
# color: var(--text-color, #212529); | |
# } | |
# h1 { | |
# font-size: 3rem; | |
# color: var(--primary-color, #007acc); | |
# text-align: center; | |
# margin-bottom: 15px; | |
# } | |
# h2, h3 { | |
# font-size: 1.5rem; | |
# color: var(--secondary-color, #005b96); | |
# text-align: center; | |
# margin-top: 20px; | |
# } | |
# p { | |
# font-family: 'Georgia', serif; | |
# color: var(--text-color, #212529); | |
# line-height: 1.6; | |
# text-align: justify; | |
# } | |
# .about-author { | |
# background-color: var(--card-bg, #ffffff); | |
# border-radius: 10px; | |
# padding: 25px; | |
# box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1); | |
# margin: 20px auto; | |
# max-width: 700px; | |
# text-align: center; | |
# color: var(--text-color, #212529); | |
# } | |
# .social-icons { | |
# display: flex; | |
# justify-content: center; | |
# gap: 20px; | |
# margin-top: 15px; | |
# } | |
# .social-icons a img { | |
# width: 40px; | |
# height: 40px; | |
# transition: transform 0.3s ease-in-out; | |
# } | |
# .social-icons a img:hover { | |
# transform: scale(1.2); | |
# } | |
# footer { | |
# margin-top: 50px; | |
# text-align: center; | |
# font-family: 'Georgia', serif; | |
# color: var(--text-muted, #6c757d); | |
# } | |
# </style> | |
# """, unsafe_allow_html=True) | |
# # Navigation Bar (Sidebar) - Inserted with the exact list as requested | |
# st.sidebar.markdown( | |
# """ | |
# # Navigation | |
# 1. **Foundation** | |
# - Home | |
# - Introduction to Data Science | |
# - Machine Learning vs Deep Learning | |
# 2. **ML Project Lifecycle** | |
# - Life Cycle of ML Project | |
# - Problem Statement | |
# - Data Collection | |
# - Data Preprocessing | |
# - Exploratory Data Analysis (EDA) | |
# - Feature Engineering | |
# - Model Selection | |
# - Model Training | |
# - Model Evaluation & Tuning | |
# - Model Deployment | |
# - Monitoring | |
# 3. **Core Algorithms** | |
# - Linear Regression | |
# - Logistic Regression | |
# - k-Nearest Neighbors (kNN) | |
# - Decision Trees | |
# - Support Vector Machines (SVM) | |
# - Ensemble Techniques | |
# 4. **Model Evaluation** | |
# - Performance Metrics | |
# - Accuracy, Precision, Recall | |
# - Confusion Matrix | |
# - ROC-AUC | |
# 5. **Data Handling** | |
# - Data Types: | |
# - Structured Data (SQL, Excel) | |
# - Semi-Structured Data (JSON, XML) | |
# - Unstructured Data (Images, Text) | |
# - Data Cleaning | |
# - Feature Engineering | |
# 6. **Computer Vision Basics** | |
# - Image Processing | |
# - Color Spaces | |
# - Image Augmentation | |
# - Splitting/Merging Images | |
# - OpenCV Basics | |
# 7. **Natural Language Processing (NLP)** | |
# - NLP Introduction | |
# - Text Preprocessing | |
# 8. **Deployment & Tools** | |
# - Model Deployment | |
# - Working with Excel/CSV | |
# - SQL for Data Science | |
# """, unsafe_allow_html=True) | |
# # Title and Tagline | |
# st.title("Mastering Machine Learning: From Basics To Brilliance ππ€") | |
# st.markdown("## Your Gateway To Become Master In Data Science") | |
# # Display Lottie animation | |
# animation_url = "https://lottie.host/a45f4739-ef78-4193-b3f9-2ea435a190d5/PsTVRgXekn.json" | |
# lottie_animation = load_lottieurl(animation_url) | |
# if lottie_animation: | |
# st_lottie(lottie_animation, height=200, key="animation") | |
# # About the App Section | |
# st.subheader("About This Application") | |
# st.markdown(""" | |
# This platform serves as a **comprehensive guide to Machine Learning and Data Science**. | |
# From grasping the fundamentals to deploying models, it offers insights into the entire lifecycle: | |
# - **Problem Definition**: Understand the business context and set clear objectives. | |
# - **Data Handling**: Collect, clean, and explore datasets to uncover insights. | |
# - **Model Development**: Build and optimize machine learning models. | |
# - **Model Deployment**: Deliver real-world solutions and monitor performance. | |
# Designed for both beginners and those looking to refine their skills, this app provides a structured learning path enriched with practical examples. | |
# """) | |
# # Key Takeaways Section | |
# st.subheader("What You'll Learn Here") | |
# st.markdown(""" | |
# 1. **Step-by-Step Roadmaps**: Detailed guidance to help you navigate through data science challenges. | |
# 2. **Hands-on Projects**: Real-world examples and code snippets for applied learning. | |
# 3. **Visualizations**: Clear, intuitive graphs and plots to simplify complex concepts. | |
# 4. **Insights from Experience**: Lessons from my personal journey to help you avoid common pitfalls. | |
# """) | |
# # Author Section | |
# st.markdown(""" | |
# <div class="about-author"> | |
# <h2>About the Author</h2> | |
# <p> | |
# Hello! I'm <strong>Yash Harish Gupta</strong>, an aspiring data scientist deeply passionate about machine learning. | |
# My journey began with curiosity about how data drives decisions and has evolved into a mission to create impactful solutions. | |
# Currently, I am learning and preparing to embark on my professional career in this exciting field. | |
# </p> | |
# </div> | |
# """, unsafe_allow_html=True) | |
# # Social Links Section | |
# st.markdown(""" | |
# <div class="social-icons"> | |
# <a href="https://www.linkedin.com/in/yash-harish-gupta-71b011189/" target="_blank"> | |
# <img src="https://upload.wikimedia.org/wikipedia/commons/c/ca/LinkedIn_logo_initials.png" alt="LinkedIn"> | |
# </a> | |
# <a href="https://github.com/YashGupta018" target="_blank"> | |
# <img src="https://github.githubassets.com/images/modules/logos_page/GitHub-Mark.png" alt="GitHub"> | |
# </a> | |
# </div> | |
# """, unsafe_allow_html=True) | |
# # Footer Section | |
# st.markdown(""" | |
# <footer> | |
# <p>Made with β€οΈ by <strong>Yash Harish Gupta</strong> | Β© 2024</p> | |
# </footer> | |
# """, unsafe_allow_html=True) | |
# ------------------------------------------------------------------------------------------------------------------------------------------------------- | |
# import streamlit as st | |
# from streamlit_lottie import st_lottie | |
# import requests | |
# # Function to load Lottie animation from a URL | |
# def load_lottieurl(url: str): | |
# """Fetch Lottie animation JSON from a URL.""" | |
# try: | |
# response = requests.get(url) | |
# if response.status_code == 200: | |
# return response.json() | |
# except requests.exceptions.RequestException: | |
# return None | |
# # CSS Styling for light and dark modes | |
# st.markdown(""" | |
# <style> | |
# body { | |
# margin: 0; | |
# padding: 0; | |
# font-family: 'Roboto', sans-serif; | |
# background-color: var(--background-color, #f8f9fa); | |
# color: var(--text-color, #212529); | |
# } | |
# h1 { | |
# font-size: 3rem; | |
# color: var(--primary-color, #007acc); | |
# text-align: center; | |
# margin-bottom: 15px; | |
# } | |
# h2, h3 { | |
# font-size: 1.5rem; | |
# color: var(--secondary-color, #005b96); | |
# text-align: center; | |
# margin-top: 20px; | |
# } | |
# p { | |
# font-family: 'Georgia', serif; | |
# color: var(--text-color, #212529); | |
# line-height: 1.6; | |
# text-align: justify; | |
# } | |
# .about-author { | |
# background-color: var(--card-bg, #ffffff); | |
# border-radius: 10px; | |
# padding: 25px; | |
# box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1); | |
# margin: 20px auto; | |
# max-width: 700px; | |
# text-align: center; | |
# color: var(--text-color, #212529); | |
# } | |
# .social-icons { | |
# display: flex; | |
# justify-content: center; | |
# gap: 20px; | |
# margin-top: 15px; | |
# } | |
# .social-icons a img { | |
# width: 40px; | |
# height: 40px; | |
# transition: transform 0.3s ease-in-out; | |
# } | |
# .social-icons a img:hover { | |
# transform: scale(1.2); | |
# } | |
# footer { | |
# margin-top: 50px; | |
# text-align: center; | |
# font-family: 'Georgia', serif; | |
# color: var(--text-muted, #6c757d); | |
# } | |
# </style> | |
# """, unsafe_allow_html=True) | |
# # Title and Tagline | |
# st.title("Mastering Machine Learning: From Basics To Brilliance ππ€") | |
# st.markdown("## Your Gateway To Become Master In Data Science") | |
# # Display Lottie animation | |
# animation_url = "https://lottie.host/a45f4739-ef78-4193-b3f9-2ea435a190d5/PsTVRgXekn.json" | |
# lottie_animation = load_lottieurl(animation_url) | |
# if lottie_animation: | |
# st_lottie(lottie_animation, height=200, key="animation") | |
# # About the App Section | |
# st.subheader("About This Application") | |
# st.markdown(""" | |
# This platform serves as a **comprehensive guide to Machine Learning and Data Science**. | |
# From grasping the fundamentals to deploying models, it offers insights into the entire lifecycle: | |
# - **Problem Definition**: Understand the business context and set clear objectives. | |
# - **Data Handling**: Collect, clean, and explore datasets to uncover insights. | |
# - **Model Development**: Build and optimize machine learning models. | |
# - **Model Deployment**: Deliver real-world solutions and monitor performance. | |
# Designed for both beginners and those looking to refine their skills, this app provides a structured learning path enriched with practical examples. | |
# """) | |
# # Key Takeaways Section | |
# st.subheader("What You'll Learn Here") | |
# st.markdown(""" | |
# 1. **Step-by-Step Roadmaps**: Detailed guidance to help you navigate through data science challenges. | |
# 2. **Hands-on Projects**: Real-world examples and code snippets for applied learning. | |
# 3. **Visualizations**: Clear, intuitive graphs and plots to simplify complex concepts. | |
# 4. **Insights from Experience**: Lessons from my personal journey to help you avoid common pitfalls. | |
# """) | |
# # Author Section | |
# st.markdown(""" | |
# <div class="about-author"> | |
# <h2>About the Author</h2> | |
# <p> | |
# Hello! I'm <strong>Yash Harish Gupta</strong>, an aspiring data scientist deeply passionate about machine learning. | |
# My journey began with curiosity about how data drives decisions and has evolved into a mission to create impactful solutions. | |
# Currently, I am learning and preparing to embark on my professional career in this exciting field. | |
# </p> | |
# </div> | |
# """, unsafe_allow_html=True) | |
# # Social Links Section | |
# st.markdown(""" | |
# <div class="social-icons"> | |
# <a href="https://www.linkedin.com/in/yash-harish-gupta-71b011189/" target="_blank"> | |
# <img src="https://upload.wikimedia.org/wikipedia/commons/c/ca/LinkedIn_logo_initials.png" alt="LinkedIn"> | |
# </a> | |
# <a href="https://github.com/YashGupta018" target="_blank"> | |
# <img src="https://github.githubassets.com/images/modules/logos_page/GitHub-Mark.png" alt="GitHub"> | |
# </a> | |
# </div> | |
# """, unsafe_allow_html=True) | |
# # Footer Section | |
# st.markdown(""" | |
# <footer> | |
# <p>Made with β€οΈ by <strong>Yash Harish Gupta</strong> | Β© 2024</p> | |
# </footer> | |
# """, unsafe_allow_html=True) |