Spaces:
Build error
Build error
File size: 4,231 Bytes
a094c6a |
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 |
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!"
) |