Spaces:
Sleeping
Sleeping
File size: 5,561 Bytes
e083994 |
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 |
import streamlit as st
import pandas as pd
st.set_page_config(
page_title="HomePage",
page_icon="🚀",
layout="wide"
)
# Global CSS for consistent styling across all pages
st.markdown("""
<style>
body, .stApp {
color: #4F4F4F; /* Replace with your desired font color */
background-color: #FFFFFF; /* Optional: Set a fixed background color */
}
h1, h2, h3, h4, h5, h6 {
color: #BB3385; /* Replace with your heading color */
}
p {
color: #4F4F4F; /* Replace with your paragraph text color */
}
ul li {
color: #4F4F4F; /* List item color */
}
</style>
""", unsafe_allow_html=True)
st.markdown(
"""
<style>
.stApp {
background-image: url("https://huggingface.co/spaces/LakshmiHarika/MachineLearning/resolve/main/DALL%C2%B7E%202024-12-03%2023.34.47%20-%20A%20simple%20and%20elegant%20background%20image%20for%20an%20AI-themed%20web%20application.%20The%20background%20should%20feature%20a%20soft%20gradient%20transitioning%20from%20white%20to%20ligh.webp");
background-size: cover;
background-repeat: no-repeat;
background-attachment: fixed;
}
</style>
""",
unsafe_allow_html=True
)
st.write("""
As we discussed earlier, to mimic the learning ability of natural intelligence, we rely on two powerful tools:
- **Machine Learning (ML)**
- **Deep Learning (DL)**
""")
st.write("""
These tools share the same purpose: enabling machines to learn. However, just like two students in the same class who use different tools for the same task, these tools have their unique characteristics.
""")
st.write("""
### ✨ Imagine This: ✏️📚
Two students are in the same class. One student takes notes every day. The second student, who hasn’t been consistent with their notes, borrows the first student’s notes to copy them. To do this, they use two tools: a pen and a pencil. While both tools serve the same purpose of writing, their functionality differs:
""")
st.write("""
- A **pencil** is used for temporary writing, as it can be erased and modified.
- A **pen** is used for permanent writing, as it creates indelible marks.
""")
st.write("""
Similarly, **Machine Learning (ML)** and **Deep Learning (DL)** share the same goal: **Learning**. However, their approaches and functionalities differ, much like the pen and pencil.
Let’s now dive deeper to explore these differences and understand how each tool works.
""")
st.write("""
### 🧠 Key Differences Between Machine Learning (ML) and Deep Learning (DL)""")
st.write("""
One key difference lies in how **Machine Learning (ML)** and **Deep Learning (DL)** handle data:
- **Machine Learning (ML)**: Works effectively with small datasets, making it suitable for scenarios where data is limited.
- **Deep Learning (DL)**: Requires large amounts of data to achieve high accuracy and performance(Hungry of Data).
The graph below illustrates this difference, showing how performance improves with increasing data for both ML and DL.
""")
# Add the graph image
st.image("https://huggingface.co/spaces/LakshmiHarika/MachineLearning/resolve/main/deepvsmachinelearning.png", caption="Performance vs Data for ML and DL", use_container_width=True)
data = {
"Feature": ["Definiton","Learning Ability","Data Type","Memory Usage","Training Time","Hardware Requirement"],
"Machine Learning (ML)": [
"Machine Learning (ML) is a tool that enables machines to mimic natural intelligence by providing them with the ability to learn, ultimately creating artificial intelligence.",
"Uses statistical concepts to mimic the learning ability",
"Only works on structured data. It can handle unstructured and semi-structured data, but it must first be converted into structured data, often leading to loss of information.",
"Uses a small amount of memory, making it lightweight",
"Takes less time to train models",
"Can run on CPUs with lower storage needs."],
"Deep Learning (DL)": [
"Deep Learning (DL) is a specialized subset of Machine Learning that uses artificial neural networks to mimic natural intelligence by providing them with the ability to learn, ultimately creating artificial intelligence.",
'Utilizes logical structures, such as <a href="https://www.google.com/search?q=what+is+neurons" target="_blank">neurons</a>, to mimic the learning ability',
"Works seamlessly with both structured and unstructured data",
"Requires significantly more memory due to its complex architectures",
"Requires much more time to train due to its complex computations",
"Runs better on GPUs with more storage and computational power."]
}
table_style = """
<style>
table {
width: 100%;
border-collapse: collapse;
text-align: left;
}
th {
padding: 10px;
border: 1px solid #dddddd;
background-color: ffc87c; /* Dark blue background */
color: #000000; /* White text */
text-align: center; /* Center align column names */
}
td:nth-child(1) {
font-weight: bold; /* Bold text */
}
td {
padding: 10px;
border: 1px solid #dddddd;
vertical-align: top;
}
td:nth-child(2), td:nth-child(3) {
width: 40%; /* Equal column width */
}
</style>
"""
df = pd.DataFrame(data)
st.markdown(table_style, unsafe_allow_html=True) # Apply the styling
st.markdown(
df.to_html(escape=False, index=False),
unsafe_allow_html=True
)
|