Harika22 commited on
Commit
43708ce
·
verified ·
1 Parent(s): b503802

Update pages/ML vs DL.py

Browse files
Files changed (1) hide show
  1. pages/ML vs DL.py +110 -0
pages/ML vs DL.py CHANGED
@@ -0,0 +1,110 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import streamlit as st
2
+
3
+ # Set the page configuration
4
+ st.set_page_config(page_title="ML vs DL", page_icon="🤖")
5
+
6
+ # Custom CSS for styling
7
+ st.markdown("""
8
+ <style>
9
+ body {
10
+ font-family: 'Arial', sans-serif;
11
+ background-color: #f4f4f4;
12
+ }
13
+ .title {
14
+ text-align: center;
15
+ font-size: 2.5rem;
16
+ color: #4CAF50;
17
+ margin-bottom: 10px;
18
+ }
19
+ .subtitle {
20
+ text-align: center;
21
+ font-size: 1.2rem;
22
+ color: #333;
23
+ margin-bottom: 30px;
24
+ }
25
+ .table-container {
26
+ margin: 0 auto;
27
+ width: 80%;
28
+ background-color: #fff;
29
+ border-radius: 10px;
30
+ box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.1);
31
+ padding: 20px;
32
+ }
33
+ .styled-table {
34
+ width: 100%;
35
+ border-collapse: collapse;
36
+ font-size: 1rem;
37
+ }
38
+ .styled-table thead tr {
39
+ background-color: #4CAF50;
40
+ color: #ffffff;
41
+ text-align: left;
42
+ }
43
+ .styled-table th, .styled-table td {
44
+ padding: 12px 15px;
45
+ }
46
+ .styled-table tbody tr {
47
+ border-bottom: 1px solid #dddddd;
48
+ }
49
+ .styled-table tbody tr:nth-of-type(even) {
50
+ background-color: #f3f3f3;
51
+ }
52
+ .styled-table tbody tr:last-of-type {
53
+ border-bottom: 2px solid #4CAF50;
54
+ }
55
+ </style>
56
+ """, unsafe_allow_html=True)
57
+
58
+ # Title and subtitle
59
+ st.markdown('<div class="title">Machine Learning vs Deep Learning</div>', unsafe_allow_html=True)
60
+ st.markdown('<div class="subtitle">Understanding the key differences</div>', unsafe_allow_html=True)
61
+
62
+ # HTML table for differences
63
+ html_table = """
64
+ <div class="table-container">
65
+ <table class="styled-table">
66
+ <thead>
67
+ <tr>
68
+ <th>Aspect</th>
69
+ <th>Machine Learning</th>
70
+ <th>Deep Learning</th>
71
+ </tr>
72
+ </thead>
73
+ <tbody>
74
+ <tr>
75
+ <td>Definition</td>
76
+ <td>Uses algorithms to parse data, learn from it, and make predictions.</td>
77
+ <td>A subset of ML focused on neural networks with many layers.</td>
78
+ </tr>
79
+ <tr>
80
+ <td>Data Dependency</td>
81
+ <td>Performs well with structured and smaller datasets.</td>
82
+ <td>Requires large amounts of unstructured data to perform well.</td>
83
+ </tr>
84
+ <tr>
85
+ <td>Feature Engineering</td>
86
+ <td>Requires manual feature extraction by domain experts.</td>
87
+ <td>Automates feature extraction using neural networks.</td>
88
+ </tr>
89
+ <tr>
90
+ <td>Hardware Requirements</td>
91
+ <td>Works on standard CPUs; lower hardware demands.</td>
92
+ <td>Requires GPUs/TPUs for efficient computation.</td>
93
+ </tr>
94
+ <tr>
95
+ <td>Interpretability</td>
96
+ <td>More interpretable and explainable results.</td>
97
+ <td>Less interpretable due to complex neural networks.</td>
98
+ </tr>
99
+ <tr>
100
+ <td>Training Time</td>
101
+ <td>Relatively faster to train models.</td>
102
+ <td>Training can take significantly longer.</td>
103
+ </tr>
104
+ </tbody>
105
+ </table>
106
+ </div>
107
+ """
108
+
109
+ # Render the HTML table
110
+ st.markdown(html_table, unsafe_allow_html=True)