Spaces:
Build error
Build error
File size: 13,449 Bytes
2ae5419 4265660 2ae5419 4265660 2ae5419 4265660 2ae5419 4265660 2ae5419 4265660 2ae5419 4265660 2ae5419 4265660 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 |
import streamlit as st
from streamlit_lottie import st_lottie
import requests
# Function to load Lottie animation from a URL
def load_lottie_url(url: str):
try:
r = requests.get(url)
if r.status_code == 200:
return r.json()
except requests.exceptions.RequestException:
return None
# Function to display the content of each page
def show_content(topic):
if topic == "Introduction to Data Science":
subtopic = st.sidebar.radio("Explore More", [
"Introduction",
"Understanding Intelligence",
"AI Tools: ML, DL, and Gen-AI",
"Real-Life Analogies and Examples",
"What is Data Science?",
"The Role of a Data Scientist",
"Why AI and Data Science Matter",
"Did You Know?"
])
if subtopic == "Introduction":
st.title("Understanding Data Science and Artificial Intelligence π")
st.subheader("Overview of AI and Data Science")
st.write("""
Artificial Intelligence (AI) and Data Science have become buzzwords in today's tech-driven world.
But what do they really mean, and why are they so significant? Letβs explore these fascinating concepts step by step!
""")
lottie_url = "https://assets4.lottiefiles.com/packages/lf20_tcbkqj.json"
animation_data = load_lottie_url(lottie_url)
if animation_data:
st_lottie(animation_data, speed=1, width=600, height=400)
else:
st.write("Unable to load animation.")
elif subtopic == "Understanding Intelligence":
st.title("Understanding Intelligence")
st.subheader("What is Natural Intelligence? πΎ")
st.write("""
**Definition**: NI refers to the intelligence naturally present in living beings.
**Examples**:
- A dog learning a trick. π
- Humans solving puzzles or making everyday decisions. π§
""")
st.subheader("What is Artificial Intelligence? π€")
st.write("""
**Definition**: Artificial intelligence (AI) is man-made intelligence where machines mimic human intelligence to perform tasks.
**Real-Life Examples**:
- Netflix recommending shows youβd love. π¬
- Google Maps finding the fastest route. πΊοΈ
- Alexa answering your questions. ποΈ
""")
elif subtopic == "AI Tools: ML, DL, and Gen-AI":
st.title("AI Tools: ML, DL, and Gen-AI")
st.subheader("Machine Learning (ML) π₯οΈ")
st.write("""
- **What It Does**: ML enables machines to learn from patterns in data and make decisions.
- **How It Works**: Similar to teaching a toddler to recognize fruits, ML algorithms process large datasets to "learn" and predict outcomes.
- **Real-Life Applications**: Spam email detection π§, Predicting stock prices π.
""")
st.subheader("Deep Learning (DL) π€Ώ")
st.write("""
- **What It Does**: DL uses neural networks to process and analyze complex data.
- **How It Works**: DL processes data in layers, enabling machines to perform sophisticated tasks like facial recognition and medical imaging.
- **Real-Life Applications**: Self-driving cars π, Virtual assistants like Siri and Alexa. ποΈ
""")
st.subheader("Generative AI (Gen-AI) π¨")
st.write("""
- **What It Does**: Gen-AI enables machines to generate new content like text, images, and music.
- **How It Works**: By learning patterns from data, Gen-AI creates outputs that feel original and human-like.
- **Real-Life Applications**: ChatGPT (text generation), DALLΒ·E (image creation).
""")
elif subtopic == "Real-Life Analogies and Examples":
st.title("Real-Life Analogies and Examples")
st.subheader("Analogy: Tools Are Like Pens and Pencils")
st.write("""
- ML: Learns patterns (like sketching with a pencil).
- DL: Adds depth and detail (like using a pen).
- Gen-AI: Creates entirely new outputs (like turning sketches into colorful artwork).
""")
st.subheader("Learning vs. Generating: The Art Example π©βπ¨")
st.write("""
Think of a child learning to draw:
- First, they learn the basics of drawing.
- Then they generate their own unique artwork.
AI follows the same process:
- Learning: ML and DL handle this part.
- Generating: Gen-AI takes over to create new outputs.
""")
elif subtopic == "What is Data Science?":
st.title("What is Data Science? π")
st.write("""
Data Science is the art of extracting meaningful insights from raw data. It combines AI with statistics, computer science, and domain expertise to solve real-world problems.
**Key Components of Data Science**:
- **Data Collection**: Gathering information from various sources.
- **Data Analysis**: Using tools to find patterns and trends.
- **Data Visualization**: Presenting findings through charts and graphs.
""")
elif subtopic == "The Role of a Data Scientist":
st.title("The Role of a Data Scientist")
st.write("""
A Data Scientist plays a crucial role in:
- Building predictive models.
- Analyzing customer behavior.
- Designing solutions for business challenges.
**Tools Used**: Python, R, SQL, Tableau, etc.
""")
elif subtopic == "Why AI and Data Science Matter":
st.title("Why AI and Data Science Matter")
st.write("""
AI and Data Science are transforming industries by:
- Automating tasks.
- Enhancing decision-making.
- Unlocking creative possibilities.
**Fun Fact**: By 2030, AI is expected to add $15.7 trillion to the global economy. π
""")
elif subtopic == "Did You Know?":
st.title("Did You Know?")
st.write("""
**AI is already being used to**:
- Detect diseases in medical imaging.
- Automate farming for higher crop yields.
- Generate movie scripts and music albums.
""")
# import streamlit as st
# from streamlit_lottie import st_lottie
# import requests
# # Function to load Lottie animations
# def load_lottie_url(url: str):
# r = requests.get(url)
# if r.status_code == 200:
# return r.json()
# else:
# return None
# # Function to display the content of each page
# def show_content(topic):
# if topic == "Introduction":
# st.title("Understanding Data Science and Artificial Intelligence π")
# st.subheader("Overview of AI and Data Science")
# st.write("""
# Artificial Intelligence (AI) and Data Science have become buzzwords in today's tech-driven world.
# But what do they really mean, and why are they so significant? Letβs explore these fascinating concepts step by step!
# """)
# # Load the Lottie animation
# lottie_url = "https://assets4.lottiefiles.com/packages/lf20_tcbkqj.json"
# animation_data = load_lottie_url(lottie_url)
# if animation_data:
# st_lottie(animation_data, speed=1, width=600, height=400)
# else:
# st.write("Unable to load animation.")
# elif topic == "Understanding Intelligence":
# st.title("Understanding Intelligence")
# st.subheader("What is Natural Intelligence? πΎ")
# st.write("""
# **Definition**: NI refers to the intelligence naturally present in living beings.
# **Examples**:
# - A dog learning a trick. π
# - Humans solving puzzles or making everyday decisions. π§
# """)
# st.subheader("What is Artificial Intelligence? π€")
# st.write("""
# **Definition**: Artificial intelligence (AI) is man-made intelligence where machines mimic human intelligence to perform tasks.
# **Real-Life Examples**:
# - Netflix recommending shows youβd love. π¬
# - Google Maps finding the fastest route. πΊοΈ
# - Alexa answering your questions. ποΈ
# """)
# elif topic == "AI Tools: ML, DL, and Gen-AI":
# st.title("AI Tools: ML, DL, and Gen-AI")
# st.subheader("Machine Learning (ML) π₯οΈ")
# st.write("""
# - **What It Does**: ML enables machines to learn from patterns in data and make decisions.
# - **How It Works**: Similar to teaching a toddler to recognize fruits, ML algorithms process large datasets to "learn" and predict outcomes.
# - **Real-Life Applications**: Spam email detection π§, Predicting stock prices π.
# """)
# st.subheader("Deep Learning (DL) π€Ώ")
# st.write("""
# - **What It Does**: DL uses neural networks to process and analyze complex data.
# - **How It Works**: DL processes data in layers, enabling machines to perform sophisticated tasks like facial recognition and medical imaging.
# - **Real-Life Applications**: Self-driving cars π, Virtual assistants like Siri and Alexa. ποΈ
# """)
# st.subheader("Generative AI (Gen-AI) π¨")
# st.write("""
# - **What It Does**: Gen-AI enables machines to generate new content like text, images, and music.
# - **How It Works**: By learning patterns from data, Gen-AI creates outputs that feel original and human-like.
# - **Real-Life Applications**: ChatGPT (text generation), DALLΒ·E (image creation).
# """)
# elif topic == "Real-Life Analogies and Examples":
# st.title("Real-Life Analogies and Examples")
# st.subheader("Analogy: Tools Are Like Pens and Pencils")
# st.write("""
# - ML: Learns patterns (like sketching with a pencil).
# - DL: Adds depth and detail (like using a pen).
# - Gen-AI: Creates entirely new outputs (like turning sketches into colorful artwork).
# """)
# st.subheader("Learning vs. Generating: The Art Example π©βπ¨")
# st.write("""
# Think of a child learning to draw:
# - First, they learn the basics of drawing.
# - Then they generate their own unique artwork.
# AI follows the same process:
# - Learning: ML and DL handle this part.
# - Generating: Gen-AI takes over to create new outputs.
# """)
# elif topic == "What is Data Science?":
# st.title("What is Data Science? π")
# st.write("""
# Data Science is the art of extracting meaningful insights from raw data. It combines AI with statistics, computer science, and domain expertise to solve real-world problems.
# **Key Components of Data Science**:
# - **Data Collection**: Gathering information from various sources.
# - **Data Analysis**: Using tools to find patterns and trends.
# - **Data Visualization**: Presenting findings through charts and graphs.
# """)
# elif topic == "The Role of a Data Scientist":
# st.title("The Role of a Data Scientist")
# st.write("""
# A Data Scientist plays a crucial role in:
# - Building predictive models.
# - Analyzing customer behavior.
# - Designing solutions for business challenges.
# **Tools Used**: Python, R, SQL, Tableau, etc.
# """)
# elif topic == "Why AI and Data Science Matter":
# st.title("Why AI and Data Science Matter")
# st.write("""
# AI and Data Science are transforming industries by:
# - Automating tasks.
# - Enhancing decision-making.
# - Unlocking creative possibilities.
# **Fun Fact**: By 2030, AI is expected to add $15.7 trillion to the global economy. π
# """)
# elif topic == "Did You Know?":
# st.title("Did You Know?")
# st.write("""
# **AI is already being used to**:
# - Detect diseases in medical imaging.
# - Automate farming for higher crop yields.
# - Generate movie scripts and music albums.
# """)
# # Set up sidebar navigation
# topics = [
# "Introduction",
# "Understanding Intelligence",
# "AI Tools: ML, DL, and Gen-AI",
# "Real-Life Analogies and Examples",
# "What is Data Science?",
# "The Role of a Data Scientist",
# "Why AI and Data Science Matter",
# "Did You Know?"
# ]
# st.sidebar.title("Topics")
# selection = st.sidebar.radio("Go to", topics)
# # Initialize session state with the first topic as the default
# if "page" not in st.session_state:
# st.session_state.page = topics[0]
# # Update session state automatically when sidebar selection changes
# st.session_state.page = selection
# # Display the selected content
# show_content(st.session_state.page) |