Spaces:
Build error
Build error
File size: 8,028 Bytes
2ae5419 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 |
# import streamlit as st
# from streamlit_lottie import st_lottie
# import requests
# # Function to load Lottie animations
# def load_lottie_url(url: str):
# response = requests.get(url)
# if response.status_code != 200:
# return None
# return response.json()
# # Load Lottie animations (you can uncomment these as per your need)
# # lottie_ml = load_lottie_url("https://assets8.lottiefiles.com/packages/lf20_5eyehzdr.json")
# # lottie_dl = load_lottie_url("https://assets8.lottiefiles.com/packages/lf20_vfnu1k6m.json")
# # Sidebar navigation
# st.sidebar.title("Navigation")
# page = st.sidebar.radio("Go to:", ["Home", "ML vs DL", "Comparison Table"])
# # Add Navigate button to update page
# if st.sidebar.button("Navigate"):
# st.session_state.page = page
# # Set page to session state if not already defined
# if "page" not in st.session_state:
# st.session_state.page = page
# # Home page
# if st.session_state.page == "Home":
# st.title("Understanding Machine Learning and Deep Learning")
# st.markdown(
# """
# Welcome to the interactive guide on Machine Learning (ML) and Deep Learning (DL). This space helps you
# explore the differences, capabilities, and applications of ML and DL in a structured manner.
# """
# )
# # If lottie_ml is loaded, display it (uncomment the following line when using animations)
# # if lottie_ml:
# # st_lottie(lottie_ml, height=300, key="ml_home")
# # ML vs DL page
# elif st.session_state.page == "ML vs DL":
# st.title("Difference Between Machine Learning (ML) and Deep Learning (DL)")
# st.subheader("Machine Learning π₯οΈ")
# st.markdown(
# """
# - Uses statistics to understand patterns in data and make predictions π.
# - Can learn with less data π.
# - Handles structured data; unstructured data must be converted to structured form π.
# - Requires less memory π§ πΎ.
# - Trains models in less time β±οΈ.
# - Can run efficiently on CPUs without requiring powerful hardware π₯οΈ.
# """
# )
# st.subheader("Deep Learning π€")
# st.markdown(
# """
# - Uses neural networks to mimic brain-like learning and decision-making π§ .
# - Requires large amounts of data for better accuracy π½οΈπ.
# - Handles both structured and unstructured data like images, text, and audio πΌοΈππ§.
# - Requires more memory and storage π§ πΎ.
# - Takes more time to train due to complex calculations β±οΈ.
# - Needs GPUs and advanced hardware for efficient processing π₯οΈπ‘.
# """
# )
# # If lottie_dl is loaded, display it (uncomment the following line when using animations)
# # if lottie_dl:
# # st_lottie(lottie_dl, height=300, key="dl_page")
# # Comparison Table page
# elif st.session_state.page == "Comparison Table":
# st.title("Comparison Table: ML vs DL")
# st.markdown(
# """
# | **Aspect** | **Machine Learning (ML)** | **Deep Learning (DL)** |
# |-------------------------|-------------------------------------------------|-------------------------------------------------|
# | **Definition** | Uses algorithms and statistics to learn from data. | Uses neural networks to mimic brain-like decision-making. |
# | **Data Dependency** | Works well with smaller datasets. | Requires large datasets for better accuracy. |
# | **Data Type** | Handles structured data only. | Handles both structured and unstructured data. |
# | **Training Time** | Requires less time to train. | Requires more time to train. |
# | **Hardware** | Can run on CPUs. | Requires GPUs and advanced hardware. |
# | **Memory Requirement** | Uses less memory. | Requires more memory and storage. |
# """
# )
# st.info(
# "Did you know? Deep Learning models are inspired by the human brain, making them exceptionally powerful for tasks like image recognition and natural language processing!"
# )
import streamlit as st
from streamlit_lottie import st_lottie
import requests
# Function to load Lottie animations
def load_lottie_url(url: str):
response = requests.get(url)
if response.status_code != 200:
return None
return response.json()
# Sidebar navigation
st.sidebar.title("Navigation")
page = st.sidebar.radio("Go to:", ["Home", "ML vs DL", "Comparison Table"])
# Initialize session state if not already done
if "page" not in st.session_state:
st.session_state.page = page
else:
st.session_state.page = page # Automatically update the session state when the radio selection changes
# Home page
if st.session_state.page == "Home":
st.title("Understanding Machine Learning and Deep Learning")
st.markdown(
"""
Welcome to the interactive guide on Machine Learning (ML) and Deep Learning (DL). This space helps you
explore the differences, capabilities, and applications of ML and DL in a structured manner.
"""
)
# ML vs DL page
elif st.session_state.page == "ML vs DL":
st.title("Difference Between Machine Learning (ML) and Deep Learning (DL)")
st.subheader("Machine Learning π₯οΈ")
st.markdown(
"""
- Uses statistics to understand patterns in data and make predictions π.
- Can learn with less data π.
- Handles structured data; unstructured data must be converted to structured form π.
- Requires less memory π§ πΎ.
- Trains models in less time β±οΈ.
- Can run efficiently on CPUs without requiring powerful hardware π₯οΈ.
"""
)
st.subheader("Deep Learning π€")
st.markdown(
"""
- Uses neural networks to mimic brain-like learning and decision-making π§ .
- Requires large amounts of data for better accuracy π½οΈπ.
- Handles both structured and unstructured data like images, text, and audio πΌοΈππ§.
- Requires more memory and storage π§ πΎ.
- Takes more time to train due to complex calculations β±οΈ.
- Needs GPUs and advanced hardware for efficient processing π₯οΈπ‘.
"""
)
# Comparison Table page
elif st.session_state.page == "Comparison Table":
st.title("Comparison Table: ML vs DL")
st.markdown(
"""
| **Aspect** | **Machine Learning (ML)** | **Deep Learning (DL)** |
|-------------------------|-------------------------------------------------|-------------------------------------------------|
| **Definition** | Uses algorithms and statistics to learn from data. | Uses neural networks to mimic brain-like decision-making. |
| **Data Dependency** | Works well with smaller datasets. | Requires large datasets for better accuracy. |
| **Data Type** | Handles structured data only. | Handles both structured and unstructured data. |
| **Training Time** | Requires less time to train. | Requires more time to train. |
| **Hardware** | Can run on CPUs. | Requires GPUs and advanced hardware. |
| **Memory Requirement** | Uses less memory. | Requires more memory and storage. |
"""
)
st.info(
"Did you know? Deep Learning models are inspired by the human brain, making them exceptionally powerful for tasks like image recognition and natural language processing!"
) |