Spaces:
Sleeping
Sleeping
Update pages/Machine learning VS Deep Learning.py
Browse files
pages/Machine learning VS Deep Learning.py
CHANGED
@@ -1,46 +1,79 @@
|
|
1 |
import streamlit as st
|
2 |
|
3 |
-
#
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4 |
html_code = """
|
5 |
-
<table
|
6 |
-
<tr
|
7 |
-
<th
|
8 |
-
<th
|
9 |
-
<th
|
10 |
</tr>
|
11 |
<tr>
|
12 |
-
<td
|
13 |
-
<td
|
14 |
-
<td
|
15 |
</tr>
|
16 |
-
<tr
|
17 |
-
<td
|
18 |
-
<td
|
19 |
-
<td
|
20 |
</tr>
|
21 |
<tr>
|
22 |
-
<td
|
23 |
-
<td
|
24 |
-
<td
|
25 |
</tr>
|
26 |
-
<tr
|
27 |
-
<td
|
28 |
-
<td
|
29 |
-
<td
|
30 |
</tr>
|
31 |
<tr>
|
32 |
-
<td
|
33 |
-
<td
|
34 |
-
<td
|
35 |
</tr>
|
36 |
-
<tr
|
37 |
-
<td
|
38 |
-
<td
|
39 |
-
<td
|
40 |
</tr>
|
41 |
</table>
|
42 |
"""
|
43 |
|
44 |
-
#
|
45 |
-
st.markdown(
|
46 |
|
|
|
|
|
|
1 |
import streamlit as st
|
2 |
|
3 |
+
# CSS style for the table
|
4 |
+
css_style = """
|
5 |
+
<style>
|
6 |
+
table {
|
7 |
+
width: 100%;
|
8 |
+
border-collapse: collapse;
|
9 |
+
border: 1px solid black;
|
10 |
+
}
|
11 |
+
|
12 |
+
th {
|
13 |
+
background-color: #f2f2f2;
|
14 |
+
border: 1px solid black;
|
15 |
+
padding: 10px;
|
16 |
+
text-align: center;
|
17 |
+
}
|
18 |
+
|
19 |
+
td {
|
20 |
+
border: 1px solid black;
|
21 |
+
padding: 10px;
|
22 |
+
}
|
23 |
+
|
24 |
+
tr:nth-child(even) {
|
25 |
+
background-color: #f9f9f9;
|
26 |
+
}
|
27 |
+
|
28 |
+
tr:nth-child(odd) {
|
29 |
+
background-color: #ffffff;
|
30 |
+
}
|
31 |
+
</style>
|
32 |
+
"""
|
33 |
+
|
34 |
+
# HTML code for the differences table
|
35 |
html_code = """
|
36 |
+
<table>
|
37 |
+
<tr>
|
38 |
+
<th>Aspect</th>
|
39 |
+
<th>Machine Learning (ML)</th>
|
40 |
+
<th>Deep Learning (DL)</th>
|
41 |
</tr>
|
42 |
<tr>
|
43 |
+
<td>Definition</td>
|
44 |
+
<td>A subset of AI focused on enabling systems to learn from data.</td>
|
45 |
+
<td>A subset of ML that uses neural networks to process data.</td>
|
46 |
</tr>
|
47 |
+
<tr>
|
48 |
+
<td>Data Dependency</td>
|
49 |
+
<td>Performs well on small to medium-sized datasets.</td>
|
50 |
+
<td>Requires large datasets to perform effectively.</td>
|
51 |
</tr>
|
52 |
<tr>
|
53 |
+
<td>Model Complexity</td>
|
54 |
+
<td>Uses simple algorithms like linear regression or decision trees.</td>
|
55 |
+
<td>Utilizes complex architectures like CNNs and RNNs.</td>
|
56 |
</tr>
|
57 |
+
<tr>
|
58 |
+
<td>Computation Power</td>
|
59 |
+
<td>Less computationally intensive.</td>
|
60 |
+
<td>Highly computationally intensive, often requires GPUs.</td>
|
61 |
</tr>
|
62 |
<tr>
|
63 |
+
<td>Feature Engineering</td>
|
64 |
+
<td>Feature engineering is essential for performance.</td>
|
65 |
+
<td>Automatically learns features from data.</td>
|
66 |
</tr>
|
67 |
+
<tr>
|
68 |
+
<td>Applications</td>
|
69 |
+
<td>Fraud detection, recommendation systems, etc.</td>
|
70 |
+
<td>Image recognition, natural language processing, etc.</td>
|
71 |
</tr>
|
72 |
</table>
|
73 |
"""
|
74 |
|
75 |
+
# Inject CSS into Streamlit
|
76 |
+
st.markdown(css_style, unsafe_allow_html=True)
|
77 |
|
78 |
+
# Render the HTML in Streamlit
|
79 |
+
st.markdown(html_code, unsafe_allow_html=True)
|