varshitha22 commited on
Commit
2225d5c
·
verified ·
1 Parent(s): 11465c0

Update pages/pg.py

Browse files
Files changed (1) hide show
  1. pages/pg.py +103 -72
pages/pg.py CHANGED
@@ -1,77 +1,108 @@
1
  import streamlit as st
2
 
3
  # Set page configuration
4
- st.set_page_config(page_title="introduction to AI,ML and DL", page_icon="🤖", layout="wide")
5
-
6
- # Custom CSS for styling
7
- st.markdown("""
8
- <style>
9
- .main-title {
10
- font-size: 36px;
11
- font-weight: bold;
12
- color: #2980B9;
13
- }
14
- .sub-title {
15
- font-size: 30px;
16
- font-weight: bold;
17
- color: #8E44AD;
18
- }
19
- .highlight {
20
- color: #E74C3C;
21
- font-weight: bold;
22
- }
23
- .content {
24
- font-size: 18px;
25
- line-height: 1.8;
26
- color: #2C3E50;
27
- }
28
- </style>
29
- """, unsafe_allow_html=True)
30
-
31
- # HTML content with the class-based styling
32
- st.markdown("""
33
- <div class="content">
34
- <h2 class="main-title">Artificial:</h2>
35
- <p>The term <b>artificial</b> refers to anything that is not naturally occurring and is created by humans.</p>
36
-
37
- <h3 class="sub-title">Examples:</h3>
38
- <ul>
39
- Artificial Satellites:</b> An artificial satellite is a man-made object that orbits Earth or other planets.
40
- Unlike the Moon (a natural satellite), artificial satellites are built for specific purposes like communication, navigation, weather monitoring, and research.</li>
41
- Artificial Flowers:</b> Artificial flowers are man-made replicas of real flowers, crafted using materials like silk, plastic, paper, or fabric.
42
- They are designed to mimic the appearance of natural flowers and are used in decoration, religious ceremonies, events, and artistic arrangements.</li>
43
- </ul>
44
-
45
- <h2 class="main-title">Intelligence:</h2>
46
- <p><span class="highlight">Intelligence</span> is the ability to think, learn, understand, reason, and make decisions.</p>
47
- <p>This intelligence exists naturally, we call it <span class="highlight">natural intelligence</span>.</p>
48
-
49
- <h3 class="sub-title">Example of Natural Intelligence:</h3>
50
- <p>Imagine a child learning to recognize different animals.</p>
51
- <ul>
52
- <li><b>Observation & Learning:</b> The child sees a dog for the first time and hears their parents say, “This is a dog.”</li>
53
- <li>The child observes its shape, fur, barking sound, and movement.</li>
54
- </ul>
55
-
56
- <h2 class="main-title">Artificial Intelligence:</h2>
57
- <p><span class="highlight">Artificial Intelligence</span> is a branch of computer science that focuses on mimicking, copying, or cloning human intelligence in machines, enabling them to perform tasks like a human.</p>
58
- <p>In other words, <span class="highlight">Artificial Intelligence</span> is a field where machines try to mimic the natural intelligence to create their own intelligence to perform day-to-day tasks without human intervention.</p>
59
-
60
- <h3 class="sub-title">Example:</h3>
61
- <p>Imagine a baby learning to walk. At first, the baby stumbles and falls, but with each attempt, they improve. Their brain automatically learns from past experiences — adjusting balance, correcting mistakes, and gradually walking without help.
62
- This is an example of natural intelligence — the ability to learn, adapt, and improve based on experience.</p>
63
-
64
- <h3 class="sub-title">How AI Mimics This Process:</h3>
65
- <p>Now, think about a self-driving car. In the beginning, the car doesn’t know how to drive. It is trained by feeding it thousands of hours of road data — how to stop at red lights, recognize pedestrians, and adjust speed.
66
- The AI system analyzes these patterns, learns from past mistakes, and gets better at driving over time.</p>
67
- <p>Just like a baby learns to walk through trial and error, AI learns by analyzing data, identifying patterns, and making decisions based on what it has learned.</p>
68
-
69
- <h3 class="sub-title">Real-World Examples of AI:</h3>
70
- <ul>
71
- <li>Siri, Alexa, and Google Assistant process natural language to answer questions.</li>
72
- </ul>
73
-
74
- <p>If you want to mimic/copy/clone human intelligence on a machine, there are some techniques and tools involved.</p>
75
  </div>
76
- """, unsafe_allow_html=True)
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
77
 
 
1
  import streamlit as st
2
 
3
  # Set page configuration
4
+ st.set_page_config(
5
+ page_title="Understanding Artificial Intelligence and Intelligence",
6
+ page_icon="🤖",
7
+ layout="wide"
8
+ )
9
+
10
+ # Main Title
11
+ st.markdown("<h1 style='text-align: center; color: #FF5733;'>🌟 Understanding Artificial Intelligence and Intelligence</h1>", unsafe_allow_html=True)
12
+
13
+ # Visual Section: Comparison of AI, ML, DL, and Generative AI
14
+ st.markdown("<h2 style='text-align: center; color: #F39C12;'>🔹 AI vs ML vs DL vs Generative AI</h2>", unsafe_allow_html=True)
15
+
16
+ image_url = "https://huggingface.co/spaces/sushma2910/Drive_in_to_ML/resolve/main/venn%20diagram.jpg"
17
+
18
+ st.markdown(
19
+ f"""
20
+ <div style="display: flex; justify-content: center;">
21
+ <img src="{image_url}" alt="AI vs ML vs DL vs Generative AI" width="600">
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
22
  </div>
23
+ """,
24
+ unsafe_allow_html=True
25
+ )
26
+ # Section 1: Artificial
27
+ st.markdown("<h2 style='color: #F39C12; font-weight: bold;'>🔹 1. What is Artificial?</h2>", unsafe_allow_html=True)
28
+
29
+ with st.expander("Read more about Artificial"):
30
+ st.write("""
31
+ The term **artificial** refers to anything that is not naturally occurring and is created by humans.
32
+
33
+ **Examples:**
34
+ - **Artificial Satellites**: A man-made object that orbits Earth or other planets. These are built for specific purposes like communication, navigation, weather monitoring, and research.
35
+ - **Artificial Flowers**: These are man-made replicas of real flowers, crafted using materials like silk, plastic, or fabric. They are used for decoration, religious ceremonies, events, and artistic arrangements.
36
+ """)
37
+
38
+ # Section 2: Intelligence
39
+ st.markdown("<h2 style='color: #F39C12; font-weight: bold;'>🔹 2. What is Intelligence?</h2>", unsafe_allow_html=True)
40
+
41
+ with st.expander("Read more about Intelligence"):
42
+ st.write("""
43
+ **Intelligence** is the ability to think, learn, understand, reason, and make decisions.
44
+
45
+ This intelligence exists naturally, and we call it **natural intelligence**.
46
+
47
+ **Example:**
48
+ Imagine a child learning to recognize different animals.
49
+ - The child sees a dog for the first time and hears their parents say, “This is a dog.”
50
+ - The child observes its shape, fur, barking sound, and movement.
51
+ """)
52
+
53
+ # Section 3: Artificial Intelligence (AI)
54
+ st.markdown("<h2 style='color: #F39C12; font-weight: bold;'>🔹 3. What is Artificial Intelligence (AI)?</h2>", unsafe_allow_html=True)
55
+
56
+ with st.expander("Read more about Artificial Intelligence"):
57
+ st.write("""
58
+ **Artificial Intelligence (AI)** is a field of computer science that focuses on mimicking, copying, or cloning human intelligence in machines, enabling them to perform tasks like a human.
59
+
60
+ **For Example:** Imagine a baby learning to walk.
61
+ - At first, the baby stumbles and falls, but with each attempt, they improve.
62
+ - Their brain learns from past experiences and adjusts its balance to walk without help.
63
+
64
+ **How AI Mimics This Process:**
65
+ - Think about a self-driving car. Initially, it doesn’t know how to drive.
66
+ - It is trained using thousands of hours of road data — learning to stop at red lights, recognize pedestrians, and adjust speed.
67
+ - Over time, the AI improves by learning from its mistakes, much like how a baby learns to walk.
68
+
69
+ **Real-World Examples of AI:**
70
+ - **Siri, Alexa, and Google Assistant**: These AI systems process natural language to answer questions.
71
+ """)
72
+
73
+
74
+
75
+ # Section 4: Techniques and Tools for AI
76
+ st.markdown("<h2 style='color: #F39C12; font-weight: bold;'>🔹 4. Techniques and Tools for AI</h2>", unsafe_allow_html=True)
77
+
78
+ with st.expander("AI Techniques and Tools"):
79
+ st.write("""
80
+ If you want to mimic or clone human intelligence on a machine, there are several techniques and tools involved.
81
+ These include:
82
+ # image
83
+ image_url = "https://huggingface.co/spaces/sushma2910/Drive_in_to_ML/resolve/main/venn%20diagram.jpg"
84
+
85
+ st.markdown(
86
+ f"""
87
+ <div style="display: flex; justify-content: center;">
88
+ <img src="{image_url}" alt="AI vs ML vs DL vs Generative AI" width="600">
89
+ </div>
90
+ """,
91
+ unsafe_allow_html=True
92
+ )
93
+ - **Neural Networks**
94
+ - **Deep Learning Frameworks** (e.g., TensorFlow, PyTorch)
95
+ - **Natural Language Processing (NLP)** for understanding text
96
+ - **Reinforcement Learning** for learning through interaction
97
+ """)
98
+
99
+ # Section 5: Summary
100
+ st.markdown("<h2 style='color: #F39C12; font-weight: bold;'>🔹 5. Summary</h2>", unsafe_allow_html=True)
101
+ st.write("""
102
+ In conclusion, Artificial Intelligence is a powerful tool that mimics human intelligence to perform tasks autonomously.
103
+ From understanding natural language to learning from data, AI systems have the potential to revolutionize many industries,
104
+ from healthcare to entertainment, and beyond.
105
+
106
+ AI's ability to mimic natural intelligence is leading to advancements like self-driving cars, AI chatbots, and even creative AI tools like image generators.
107
+ """)
108