varshitha22 commited on
Commit
37ab4b6
·
verified ·
1 Parent(s): 374213f

Update pages/Machine Learning vs Deep Learning.py

Browse files
pages/Machine Learning vs Deep Learning.py CHANGED
@@ -0,0 +1,43 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import streamlit as st
2
+ import pandas as pd
3
+
4
+ # Define the table data
5
+ data = {
6
+ "Aspect": [
7
+ "Learning Approach", "Data Requirement", "Complexity of Tasks",
8
+ "Computation Power", "Algorithms Used", "Training Time", "Data Types Processed"
9
+ ],
10
+ "Machine Learning (ML)": [
11
+ "Uses a statistical approach to analyze data and make predictions.",
12
+ "Works well with smaller datasets.",
13
+ "Handles simpler relationships (e.g., predicting house prices).",
14
+ "Can run on CPUs (low computational power).",
15
+ "Uses models like KNN, Decision Trees, Linear Regression.",
16
+ "Faster training due to simpler computations.",
17
+ "Works with structured/tabular data."
18
+ ],
19
+ "Deep Learning (DL)": [
20
+ "Uses neural networks to automatically learn patterns.",
21
+ "Requires large amounts of data to perform well.",
22
+ "Handles complex relationships (e.g., object recognition in images).",
23
+ "Requires GPUs/TPUs (high computational power).",
24
+ "Uses ANN, CNN, RNN for feature extraction and learning.",
25
+ "Longer training time due to deep layers and complex processing.",
26
+ "Works with images, videos, text, and audio."
27
+ ]
28
+ }
29
+
30
+ # Create DataFrame
31
+ df = pd.DataFrame(data)
32
+
33
+ # Display the table in Streamlit
34
+ st.title("Machine Learning vs. Deep Learning")
35
+ st.write("### Comparison Table")
36
+ st.table(df)
37
+
38
+ # Convert DataFrame to HTML
39
+ html_table = df.to_html(index=False, escape=False)
40
+
41
+ # Display HTML table
42
+ st.write("### HTML Representation")
43
+ st.code(html_table, language="html")