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(""" """, 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("""
""", unsafe_allow_html=True) st.markdown(""" """, 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(""" # # """, 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(""" # # """, unsafe_allow_html=True) # st.markdown(""" # # # """, 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(""" # # """, 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(""" # # """, unsafe_allow_html=True) # # Social Links Section # st.markdown(""" # # """, unsafe_allow_html=True) # # Footer Section # st.markdown(""" # # """, 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(""" # # """, 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(""" # # """, unsafe_allow_html=True) # # Social Links Section # st.markdown(""" # # """, unsafe_allow_html=True) # # Footer Section # st.markdown(""" # # """, 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(""" # # """, 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(""" # # """, unsafe_allow_html=True) # # Social Links Section # st.markdown(""" # # """, unsafe_allow_html=True) # # Footer Section # st.markdown(""" # # """, 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(""" # # """, 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(""" # # """, unsafe_allow_html=True) # # Social Links Section # st.markdown(""" # # """, unsafe_allow_html=True) # # Footer Section # st.markdown(""" # # """, unsafe_allow_html=True)