ankithpatel commited on
Commit
9efab78
·
verified ·
1 Parent(s): 46ffc42

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
- # HTML code for a differences table
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
4
  html_code = """
5
- <table style="width: 100%; border-collapse: collapse; border: 1px solid black;">
6
- <tr style="background-color: #f2f2f2;">
7
- <th style="border: 1px solid black; padding: 10px; text-align: center;">Aspect</th>
8
- <th style="border: 1px solid black; padding: 10px; text-align: center;">Machine Learning (ML)</th>
9
- <th style="border: 1px solid black; padding: 10px; text-align: center;">Deep Learning (DL)</th>
10
  </tr>
11
  <tr>
12
- <td style="border: 1px solid black; padding: 10px;">Definition</td>
13
- <td style="border: 1px solid black; padding: 10px;">A subset of AI focused on enabling systems to learn from data.</td>
14
- <td style="border: 1px solid black; padding: 10px;">A subset of ML that uses neural networks to process data.</td>
15
  </tr>
16
- <tr style="background-color: #f9f9f9;">
17
- <td style="border: 1px solid black; padding: 10px;">Data Dependency</td>
18
- <td style="border: 1px solid black; padding: 10px;">Performs well on small to medium-sized datasets.</td>
19
- <td style="border: 1px solid black; padding: 10px;">Requires large datasets to perform effectively.</td>
20
  </tr>
21
  <tr>
22
- <td style="border: 1px solid black; padding: 10px;">Model Complexity</td>
23
- <td style="border: 1px solid black; padding: 10px;">Uses simple algorithms like linear regression or decision trees.</td>
24
- <td style="border: 1px solid black; padding: 10px;">Utilizes complex architectures like CNNs and RNNs.</td>
25
  </tr>
26
- <tr style="background-color: #f9f9f9;">
27
- <td style="border: 1px solid black; padding: 10px;">Computation Power</td>
28
- <td style="border: 1px solid black; padding: 10px;">Less computationally intensive.</td>
29
- <td style="border: 1px solid black; padding: 10px;">Highly computationally intensive, often requires GPUs.</td>
30
  </tr>
31
  <tr>
32
- <td style="border: 1px solid black; padding: 10px;">Feature Engineering</td>
33
- <td style="border: 1px solid black; padding: 10px;">Feature engineering is essential for performance.</td>
34
- <td style="border: 1px solid black; padding: 10px;">Automatically learns features from data.</td>
35
  </tr>
36
- <tr style="background-color: #f9f9f9;">
37
- <td style="border: 1px solid black; padding: 10px;">Applications</td>
38
- <td style="border: 1px solid black; padding: 10px;">Fraud detection, recommendation systems, etc.</td>
39
- <td style="border: 1px solid black; padding: 10px;">Image recognition, natural language processing, etc.</td>
40
  </tr>
41
  </table>
42
  """
43
 
44
- # Render the HTML in Streamlit
45
- st.markdown(html_code, unsafe_allow_html=True)
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)