File size: 5,629 Bytes
306c656
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
e1e7ee4
 
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
import streamlit as st

# Title and Introduction
st.markdown("""
    <style>
        body {
            font-family: Arial, sans-serif;
            margin: 20px;
            background-color: #121212; /* Dark background */
            color: #e0e0e0; /* Light text for visibility */
        }
        .title {
            text-align: center;
            color: #ffffff; /* White title text */
            font-size: 40px;
            font-weight: bold;
        }
        .subtitle {
            text-align: center;
            color: #bdbdbd; /* Light gray subtitle text */
            font-size: 18px;
        }
        .section {
            background-color: #1e1e1e; /* Darker section background */
            padding: 20px;
            border-radius: 10px;
            margin-bottom: 20px;
            box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.6); /* Subtle shadow */
        }
        .section-header {
            color: #81d4fa; /* Light blue section headers */
            font-size: 24px;
            margin-bottom: 10px;
            text-decoration: underline;
        }
        ul {
            list-style-type: none;
            padding: 0;
        }
        ul li {
            background-color: #2e2e2e; /* Slightly lighter background for list items */
            margin: 10px 0;
            padding: 15px;
            border: 1px solid #424242; /* Gray border */
            border-radius: 8px;
            font-size: 16px;
            color: #f5f5f5; /* Light text color */
        }
        table {
            width: 100%;
            border-collapse: collapse;
            margin-top: 20px;
            background-color: #1e1e1e; /* Table background matches sections */
        }
        th, td {
            text-align: left;
            padding: 12px;
            border: 1px solid #424242; /* Gray border for table cells */
            color: #e0e0e0; /* Light text color */
        }
        th {
            background-color: #263238; /* Dark blue-gray for headers */
            color: #ffffff; /* White header text */
        }
        tr:nth-child(even) {
            background-color: #2e2e2e; /* Slightly lighter rows */
        }
        tr:hover {
            background-color: #424242; /* Highlighted row on hover */
        }
    </style>
    <div class="title">Difference Between Machine Learning (ML) and Deep Learning (DL)</div>
    <p class="subtitle">Learn how ML and DL differ in capabilities, requirements, and use cases!</p>
""", unsafe_allow_html=True)

# Machine Learning Section
st.markdown("""
    <div class="section">
        <div class="section-header">Machine Learning πŸ–₯️</div>
        <ul>
            <li>Uses statistics to understand patterns in data and make predictions πŸ“Š.</li>
            <li>Can learn with less data πŸ“‰.</li>
            <li>Handles structured data; unstructured data must be converted to structured form πŸ”„.</li>
            <li>Requires less memory πŸ§ πŸ’Ύ.</li>
            <li>Trains models in less time ⏱️.</li>
            <li>Can run efficiently on CPUs without requiring powerful hardware πŸ–₯️.</li>
        </ul>
    </div>
""", unsafe_allow_html=True)

# Deep Learning Section
st.markdown("""
    <div class="section">
        <div class="section-header">Deep Learning πŸ€–</div>
        <ul>
            <li>Uses neural networks to mimic brain-like learning and decision-making 🧠.</li>
            <li>Requires large amounts of data for better accuracy πŸ½οΈπŸ“Š.</li>
            <li>Handles both structured and unstructured data like images, text, and audio πŸ–ΌοΈπŸ“πŸŽ§.</li>
            <li>Requires more memory and storage πŸ§ πŸ’Ύ.</li>
            <li>Takes more time to train due to complex calculations ⏱️.</li>
            <li>Needs GPUs and advanced hardware for efficient processing πŸ–₯οΈπŸ’‘.</li>
        </ul>
    </div>
""", unsafe_allow_html=True)

# Tabular Comparison
st.markdown("""
    <div class="section">
        <div class="section-header">Comparison Table</div>
        <table>
            <thead>
                <tr>
                    <th>Aspect</th>
                    <th>Machine Learning (ML)</th>
                    <th>Deep Learning (DL)</th>
                </tr>
            </thead>
            <tbody>
                <tr>
                    <td>Definition</td>
                    <td>Uses algorithms and statistics to learn from data.</td>
                    <td>Uses neural networks to mimic brain-like decision-making.</td>
                </tr>
                <tr>
                    <td>Data Dependency</td>
                    <td>Works well with smaller datasets.</td>
                    <td>Requires large datasets for better accuracy.</td>
                </tr>
                <tr>
                    <td>Data Type</td>
                    <td>Handles structured data only.</td>
                    <td>Handles both structured and unstructured data.</td>
                </tr>
                <tr>
                    <td>Training Time</td>
                    <td>Requires less time to train.</td>
                    <td>Requires more time to train.</td>
                </tr>
                <tr>
                    <td>Hardware</td>
                    <td>Can run on CPUs.</td>
                    <td>Requires GPUs and advanced hardware.</td>
                </tr>
                <tr>
                    <td>Memory Requirement</td>
                    <td>Uses less memory.</td>
                    <td>Requires more memory and storage.</td>
                </tr>
            </tbody>
        </table>
    </div>
""", unsafe_allow_html=True)