Update app.py
Browse files
app.py
CHANGED
|
@@ -90,26 +90,218 @@ def generate_audio_if_missing(topic, text):
|
|
| 90 |
modules = {
|
| 91 |
"What is AI?": {
|
| 92 |
"intro": [
|
| 93 |
-
"Artificial Intelligence (AI) is the
|
| 94 |
-
"It
|
| 95 |
-
"AI is used in voice assistants,
|
| 96 |
-
"
|
| 97 |
-
"
|
| 98 |
-
"
|
| 99 |
-
"
|
| 100 |
-
"
|
| 101 |
-
"AI
|
| 102 |
-
"
|
|
|
|
|
|
|
| 103 |
],
|
| 104 |
"quiz": [
|
| 105 |
-
{"q": "
|
| 106 |
-
{"q": "
|
| 107 |
-
{"q": "Which
|
| 108 |
-
{"q": "AI
|
| 109 |
-
{"q": "
|
| 110 |
]
|
| 111 |
},
|
| 112 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 113 |
}
|
| 114 |
|
| 115 |
# Initialize analytics & leaderboard
|
|
|
|
| 90 |
modules = {
|
| 91 |
"What is AI?": {
|
| 92 |
"intro": [
|
| 93 |
+
"Artificial Intelligence (AI) is the field of computer science that aims to create machines capable of intelligent behavior.",
|
| 94 |
+
"It involves building systems that can learn from data, reason through logic, perceive their environment, and make decisions.",
|
| 95 |
+
"AI is used in everyday applications like voice assistants, image recognition, and recommendation engines.",
|
| 96 |
+
"It draws on statistics, data mining, and machine learning algorithms.",
|
| 97 |
+
"AI can help automate repetitive tasks, saving time and reducing human error.",
|
| 98 |
+
"It powers self-driving cars, fraud detection systems, and smart healthcare tools.",
|
| 99 |
+
"There are different levels—such as narrow AI (task-specific) and general AI (multi-purpose).",
|
| 100 |
+
"Narrow AI is what we have today; general AI remains a future goal.",
|
| 101 |
+
"Understanding AI helps individuals adapt to the changing job market.",
|
| 102 |
+
"Ethical AI usage ensures fairness, transparency, and privacy.",
|
| 103 |
+
"Learning AI foundations enables you to innovate in various industries.",
|
| 104 |
+
"As data becomes central to modern life, AI skills become more essential."
|
| 105 |
],
|
| 106 |
"quiz": [
|
| 107 |
+
{"q": "AI stands for?", "O": ["Automated Interface","Artificial Intelligence","Applied Informatics","Advanced Integration"], "A": "Artificial Intelligence"},
|
| 108 |
+
{"q": "Narrow AI refers to systems that are?", "O": ["Task-specific","Human-like","Self-aware","Multilingual"], "A": "Task-specific"},
|
| 109 |
+
{"q": "Which powers voice assistants?", "O": ["AI","Manual Input","Open Source","Wireless"], "A": "AI"},
|
| 110 |
+
{"q": "General AI means?", "O": ["One task only","Human-level intelligence","Collecting data","Math only"], "A": "Human-level intelligence"},
|
| 111 |
+
{"q": "AI systems learn from?", "O": ["Data","Magic","Sunlight","Noise"], "A": "Data"}
|
| 112 |
]
|
| 113 |
},
|
| 114 |
+
"How ChatGPT Works": {
|
| 115 |
+
"intro": [
|
| 116 |
+
"ChatGPT is a language model built by OpenAI using deep learning techniques.",
|
| 117 |
+
"It was trained on a large dataset that includes books, articles, and websites.",
|
| 118 |
+
"It uses a transformer neural network architecture to predict the next word in a sentence.",
|
| 119 |
+
"By learning patterns of language, ChatGPT can generate fluent and coherent responses.",
|
| 120 |
+
"It can answer questions, write essays, help with code, and even generate creative content.",
|
| 121 |
+
"However, it does not truly understand meaning—it relies on statistical patterns.",
|
| 122 |
+
"ChatGPT works best when prompts are specific and clear.",
|
| 123 |
+
"It's important to verify its output, especially for critical information.",
|
| 124 |
+
"Developers can use API endpoints to integrate ChatGPT into other tools.",
|
| 125 |
+
"AI creativity is impressive—but it may hallucinate if incorrectly prompted.",
|
| 126 |
+
"Ethical guidelines inform its usage: no hate speech, personal data misuse, or harmful content.",
|
| 127 |
+
"Understanding ChatGPT helps learners leverage AI responsibly."
|
| 128 |
+
],
|
| 129 |
+
"quiz": [
|
| 130 |
+
{"q": "ChatGPT is built by?", "O": ["Google","Meta","OpenAI","Amazon"], "A": "OpenAI"},
|
| 131 |
+
{"q": "It uses which neural net?", "O": ["CNN","RNN","Transformer","KNN"], "A": "Transformer"},
|
| 132 |
+
{"q": "ChatGPT generates text by predicting?", "O": ["Next word","Image pixels","Sound frequency","Encryption keys"], "A": "Next word"},
|
| 133 |
+
{"q": "Model trained on?", "O": ["Videos","Text data","Audio only","No data"], "A": "Text data"},
|
| 134 |
+
{"q": "Always verify its?", "O": ["Cooking skills","Factual output","Voice tone","Font size"], "A": "Factual output"}
|
| 135 |
+
]
|
| 136 |
+
},
|
| 137 |
+
"Types of AI": {
|
| 138 |
+
"intro": [
|
| 139 |
+
"AI can be categorized into Narrow AI, General AI, and Super AI.",
|
| 140 |
+
"Narrow AI performs specific tasks like translation or gameplay.",
|
| 141 |
+
"General AI would have human-like intelligence across domains - it's still a goal.",
|
| 142 |
+
"Super AI would surpass human intelligence in every aspect - purely theoretical today.",
|
| 143 |
+
"Narrow AI is abundant: speech recognition, spam filters, recommendation engines.",
|
| 144 |
+
"General and Super AI are topics of research and science fiction.",
|
| 145 |
+
"Ethical safeguards are crucial as AI capabilities grow.",
|
| 146 |
+
"Understanding AI categories helps set realistic expectations.",
|
| 147 |
+
"Today’s AI is powerful but limited by design.",
|
| 148 |
+
"Progress toward general AI involves integrating reasoning, planning, and learning."
|
| 149 |
+
],
|
| 150 |
+
"quiz": [
|
| 151 |
+
{"q": "Narrow AI does?", "O": ["Everything","One task","No tasks","Future tasks"], "A": "One task"},
|
| 152 |
+
{"q": "General AI equals?", "O": ["Calc machine","Human-like intelligence","Traffic light","Login system"], "A": "Human-like intelligence"},
|
| 153 |
+
{"q": "Super AI is?", "O": ["Here now","Future concept","Manual machine","Simple code"], "A": "Future concept"},
|
| 154 |
+
{"q": "Translation apps use?", "O": ["Narrow AI","Super AI","No AI","Magic"], "A": "Narrow AI"},
|
| 155 |
+
{"q": "Spam filters are?", "O": ["General AI","Narrow AI","No AI","Super AI"], "A": "Narrow AI"}
|
| 156 |
+
]
|
| 157 |
+
},
|
| 158 |
+
"AI in Daily Life": {
|
| 159 |
+
"intro": [
|
| 160 |
+
"AI is present in our daily routines: face unlock, recommendations, search.",
|
| 161 |
+
"Streaming platforms use AI to recommend songs and videos.",
|
| 162 |
+
"Navigation apps use AI to optimize routes and avoid traffic.",
|
| 163 |
+
"Banks use AI to detect fraud and assess loan risks.",
|
| 164 |
+
"E-commerce uses AI to show personalized product suggestions.",
|
| 165 |
+
"Smart homes use AI for voice control, thermostats, and lighting.",
|
| 166 |
+
"Healthcare uses AI to aid in diagnosis and personalized treatments.",
|
| 167 |
+
"Language translation apps use AI for real-time communication.",
|
| 168 |
+
"Smart agriculture uses AI for irrigation, yield prediction, and pest control.",
|
| 169 |
+
"Understanding these everyday uses helps appreciate AI’s impact."
|
| 170 |
+
],
|
| 171 |
+
"quiz": [
|
| 172 |
+
{"q": "Face unlock uses?", "O": ["AI","Password","QR code","Manual"], "A": "AI"},
|
| 173 |
+
{"q": "YouTube suggests videos based on?", "O": ["AI","Manual","Coin Toss","Ads"], "A": "AI"},
|
| 174 |
+
{"q": "Navigation apps predict?", "O": ["Weather only","Traffic patterns","Random","Lyrics"], "A": "Traffic patterns"},
|
| 175 |
+
{"q": "Banks use AI for?", "O": ["Fraud detection","Cooking","Car wash","Gaming"], "A": "Fraud detection"},
|
| 176 |
+
{"q": "Smart homes can?", "O": ["AI control","Time travel","Teleportation","None"], "A": "AI control"}
|
| 177 |
+
]
|
| 178 |
+
},
|
| 179 |
+
"ML vs DL": {
|
| 180 |
+
"intro": [
|
| 181 |
+
"Machine Learning (ML) is a subset of AI focused on learning from data.",
|
| 182 |
+
"Deep Learning (DL) is a specialized ML method using neural networks with multiple layers.",
|
| 183 |
+
"ML algorithms include linear regression, decision trees, SVM.",
|
| 184 |
+
"DL uses neural network architectures like CNNs and RNNs.",
|
| 185 |
+
"DL is powerful for images, voice, and unstructured data.",
|
| 186 |
+
"ML works well for smaller datasets and structured data.",
|
| 187 |
+
"DL needs large datasets and computational resources.",
|
| 188 |
+
"ML models are easier to interpret; DL models are often opaque.",
|
| 189 |
+
"Use case guides choice: ML for tabular data, DL for media recognition.",
|
| 190 |
+
"Knowing this helps choose the right approach for a project."
|
| 191 |
+
],
|
| 192 |
+
"quiz": [
|
| 193 |
+
{"q": "ML learns from?", "O": ["Data only","Magic","Nothing","Sunlight"], "A": "Data only"},
|
| 194 |
+
{"q": "DL uses?", "O": ["Neural networks","Manual rules","Static code","Papers"], "A": "Neural networks"},
|
| 195 |
+
{"q": "DL works best with?", "O": ["Lots of data","Little data","No data","Water"], "A": "Lots of data"},
|
| 196 |
+
{"q": "ML models are?", "O": ["Interpretable","Invisible","Random","Imaginary"], "A": "Interpretable"},
|
| 197 |
+
{"q": "Image recognition uses?", "O": ["DL","ML only","No AI","Analog"], "A": "DL"}
|
| 198 |
+
]
|
| 199 |
+
},
|
| 200 |
+
"Deepfakes & Misinformation": {
|
| 201 |
+
"intro": [
|
| 202 |
+
"Deepfakes are synthetic media created using AI.",
|
| 203 |
+
"They can manipulate images, audio, and video to create false realities.",
|
| 204 |
+
"These can spread misinformation and harm reputation.",
|
| 205 |
+
"AI-generated fake content makes media trust more complex.",
|
| 206 |
+
"Verifying authenticity is critical in news and social platforms.",
|
| 207 |
+
"Deepfakes may target public figures or individuals.",
|
| 208 |
+
"Tools exist to help detect fakes, but technology evolves quickly.",
|
| 209 |
+
"Responsibly sharing media includes verifying before posting.",
|
| 210 |
+
"Public awareness is the best defense against deepfake misuse.",
|
| 211 |
+
"Learning this protects communities and democracy."
|
| 212 |
+
],
|
| 213 |
+
"quiz": [
|
| 214 |
+
{"q": "Deepfake means?", "O": ["Real video","Fake video","News article","Game"], "A": "Fake video"},
|
| 215 |
+
{"q": "They use?", "O": ["AI","Coin toss","Weather","Manual"], "A": "AI"},
|
| 216 |
+
{"q": "Effect of deepfakes?", "O": ["Trust erosion","Fun only","Health boost","Wealth"], "A": "Trust erosion"},
|
| 217 |
+
{"q": "To prevent fake news you?", "O": ["Verify source","Trust all","Ignore everything","Respect rumors"], "A": "Verify source"},
|
| 218 |
+
{"q": "Detection tools use?", "O": ["AI","Magic","Guess","No method"], "A": "AI"}
|
| 219 |
+
]
|
| 220 |
+
},
|
| 221 |
+
"Data Privacy Basics": {
|
| 222 |
+
"intro": [
|
| 223 |
+
"Data privacy is about keeping personal information safe.",
|
| 224 |
+
"Personal data includes names, photos, location, health records.",
|
| 225 |
+
"Many apps collect data—it's important to know which you allow.",
|
| 226 |
+
"Strong passwords and 2FA protect online accounts.",
|
| 227 |
+
"Data sharing can expose you to scams and identity theft.",
|
| 228 |
+
"Privacy settings in apps empower users to choose control.",
|
| 229 |
+
"GDPR and similar laws protect user data rights.",
|
| 230 |
+
"Awareness helps prevent misuse by bad actors.",
|
| 231 |
+
"Encrypted communication like HTTPS secures your data.",
|
| 232 |
+
"Smart data handling builds trust and safety online."
|
| 233 |
+
],
|
| 234 |
+
"quiz": [
|
| 235 |
+
{"q": "Privacy protects?", "O": ["Personal info","Weather","Rivers","Animals"], "A": "Personal info"},
|
| 236 |
+
{"q": "2FA means?", "O": ["Double Factor Authentication","2 Forms Access","Two Fun Activities","None"], "A": "Double Factor Authentication"},
|
| 237 |
+
{"q": "Encrypted sites use?", "O": ["HTTPS","HTTP","FTP","POP3"], "A": "HTTPS"},
|
| 238 |
+
{"q": "Avoid sharing?", "O": ["Passwords","Jokes","Memes","Songs"], "A": "Passwords"},
|
| 239 |
+
{"q": "Privacy laws include?", "O": ["GDPR","HTML","NoSQL","CSS"], "A": "GDPR"}
|
| 240 |
+
]
|
| 241 |
+
},
|
| 242 |
+
"Ethics in AI": {
|
| 243 |
+
"intro": [
|
| 244 |
+
"AI ethics is about responsible, fair, and transparent AI usage.",
|
| 245 |
+
"Biased data can lead to unfair decisions in AI systems.",
|
| 246 |
+
"Ethical AI respects privacy and avoids discrimination.",
|
| 247 |
+
"Transparency means understanding how AI reaches decisions.",
|
| 248 |
+
"Regulations guide developers to use AI responsibly.",
|
| 249 |
+
"We must balance innovation with societal well-being.",
|
| 250 |
+
"Involving users in decisions builds trust in AI systems.",
|
| 251 |
+
"Ethical design empowers all stakeholders equally.",
|
| 252 |
+
"Learning AI ethics creates safer and fairer technologies.",
|
| 253 |
+
"Your knowledge can ensure AI benefits everyone."
|
| 254 |
+
],
|
| 255 |
+
"quiz": [
|
| 256 |
+
{"q": "AI ethics ensures?", "O": ["Fairness","Speed","Cost","None"], "A": "Fairness"},
|
| 257 |
+
{"q": "Biased AI can?", "O": ["Discriminate","Cook","Paint","Drive"], "A": "Discriminate"},
|
| 258 |
+
{"q": "Transparency means?", "O": ["Explain decisions","Hide code","Blur data","Remove users"], "A": "Explain decisions"},
|
| 259 |
+
{"q": "Ethical AI respects?", "O": ["Privacy","Speed","Noise","Weight"], "A": "Privacy"},
|
| 260 |
+
{"q": "Ethical design builds?", "O": ["Trust","Fear","Spam","Ads"], "A": "Trust"}
|
| 261 |
+
]
|
| 262 |
+
},
|
| 263 |
+
"Computer Vision & CV": {
|
| 264 |
+
"intro": [
|
| 265 |
+
"Computer Vision (CV) enables machines to interpret visual data.",
|
| 266 |
+
"It uses cameras, sensors, and algorithms to process images.",
|
| 267 |
+
"CV applications include facial recognition, object tracking, and medical imaging.",
|
| 268 |
+
"It uses CNNs, image filters, and feature extraction techniques.",
|
| 269 |
+
"CV helps quality inspection in factories and autonomous vehicles.",
|
| 270 |
+
"It can read handwritten text and diagnose diseases from scans.",
|
| 271 |
+
"Real-time video analysis helps surveillance and safety.",
|
| 272 |
+
"CV combined with AI enables powerful automation solutions.",
|
| 273 |
+
"Understanding CV opens doors to robotics and intelligent systems.",
|
| 274 |
+
"Ethical CV requires consent and data protection in public spaces."
|
| 275 |
+
],
|
| 276 |
+
"quiz": [
|
| 277 |
+
{"q": "CV stands for?", "O": ["Core Vision","Computer Vision","Camera View","Control Voice"], "A": "Computer Vision"},
|
| 278 |
+
{"q": "CV uses?", "O": ["Images","Audio","Text only","None"], "A": "Images"},
|
| 279 |
+
{"q": "CNN is used in?", "O": ["CV","Typing","Email","Games"], "A": "CV"},
|
| 280 |
+
{"q": "CV helps in factories by?", "O": ["Inspecting products","Cooking","Sleeping","Entertainment"], "A": "Inspecting products"},
|
| 281 |
+
{"q": "CV requires ?", "O": ["Privacy","Cameras","Coins","Walls"], "A": "Cameras"}
|
| 282 |
+
]
|
| 283 |
+
},
|
| 284 |
+
"AI in Healthcare": {
|
| 285 |
+
"intro": [
|
| 286 |
+
"AI improves healthcare by analyzing medical images for diagnosis.",
|
| 287 |
+
"It can detect anomalies in X-rays, MRIs and CT scans.",
|
| 288 |
+
"Predictive models help in identifying disease risks early.",
|
| 289 |
+
"AI-driven robots assist in surgeries with precision.",
|
| 290 |
+
"Chatbots help patients with common health queries.",
|
| 291 |
+
"Drug discovery processes are accelerated by AI algorithms.",
|
| 292 |
+
"Personalized care plans benefit from AI data analysis.",
|
| 293 |
+
"Hospital administration uses AI for scheduling and predictions.",
|
| 294 |
+
"Wearable AI devices monitor vitals and alert emergencies.",
|
| 295 |
+
"Ethical use ensures patient privacy and unbiased care."
|
| 296 |
+
],
|
| 297 |
+
"quiz": [
|
| 298 |
+
{"q": "AI in imaging helps detect?", "O": ["Diseases","Music","Movies","Weather"], "A": "Diseases"},
|
| 299 |
+
{"q": "Predictive AI finds?", "O": ["Risks early","New jokes","Songs","Photos"], "A": "Risks early"},
|
| 300 |
+
{"q": "Surgery robots are?", "O": ["AI-assisted","Manual only","Electric fans","Toys"], "A": "AI-assisted"},
|
| 301 |
+
{"q": "Chatbots in healthcare?", "O": ["Answer questions","Cook food","Dance","Sleep"], "A": "Answer questions"},
|
| 302 |
+
{"q": "Wearables monitor?", "O": ["Vitals","Sand","Stars","Cars"], "A": "Vitals"}
|
| 303 |
+
]
|
| 304 |
+
}
|
| 305 |
}
|
| 306 |
|
| 307 |
# Initialize analytics & leaderboard
|