chandralegend commited on
Commit
7a6f06b
1 Parent(s): 516de6c

added quiz materials

Browse files
Files changed (2) hide show
  1. assets/quiz.json +102 -0
  2. pages/5_Quiz.py +6 -22
assets/quiz.json ADDED
@@ -0,0 +1,102 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ [
2
+ {
3
+ "question": "Which of the following best describes speech recognition?",
4
+ "options": [
5
+ "Teaching computers to understand human speech",
6
+ "Teaching humans to understand computer languages",
7
+ "Teaching computers to write code",
8
+ "Teaching humans to speak multiple languages"
9
+ ],
10
+ "answer": "Teaching computers to understand human speech"
11
+ },
12
+ {
13
+ "question": "What is one of the popular applications of speech recognition?",
14
+ "options": [
15
+ "Facial recognition",
16
+ "Virtual reality gaming",
17
+ "Voice assistants",
18
+ "Emotion detection"
19
+ ],
20
+ "answer": "Voice assistants"
21
+ },
22
+ {
23
+ "question": "Which decade saw the introduction of Hidden Markov Models (HMMs) in speech recognition?",
24
+ "options": [
25
+ "1960s",
26
+ "1970s",
27
+ "1980s",
28
+ "1990s"
29
+ ],
30
+ "answer": "1980s"
31
+ },
32
+ {
33
+ "question": "What was the purpose of the DARPA challenges in speech recognition?",
34
+ "options": [
35
+ "To promote research and advancements in the field",
36
+ "To train voice assistants",
37
+ "To improve internet connectivity",
38
+ "To develop social media platforms"
39
+ ],
40
+ "answer": "To promote research and advancements in the field"
41
+ },
42
+ {
43
+ "question": "What role did neural networks play in speech recognition?",
44
+ "options": [
45
+ "They helped in translating spoken language",
46
+ "They allowed for automatic extraction of features from speech data",
47
+ "They facilitated handwriting recognition",
48
+ "They improved internet security"
49
+ ],
50
+ "answer": "They allowed for automatic extraction of features from speech data"
51
+ },
52
+ {
53
+ "question": "Which popular voice assistant was introduced in 2011?",
54
+ "options": [
55
+ "Siri",
56
+ "Alexa",
57
+ "Cortana",
58
+ "Google Assistant"
59
+ ],
60
+ "answer": "Siri"
61
+ },
62
+ {
63
+ "question": "What recent advancements have contributed to the improvement of speech recognition?",
64
+ "options": [
65
+ "Neural networks and deep learning",
66
+ "Augmented reality technology",
67
+ "Quantum computing",
68
+ "Robotics"
69
+ ],
70
+ "answer": "Neural networks and deep learning"
71
+ },
72
+ {
73
+ "question": "In which field is speech recognition commonly used to convert spoken words into written text?",
74
+ "options": [
75
+ "Medical diagnosis",
76
+ "Automotive engineering",
77
+ "Transcription services",
78
+ "Space exploration"
79
+ ],
80
+ "answer": "Transcription services"
81
+ },
82
+ {
83
+ "question": "How does speech recognition technology benefit individuals with disabilities?",
84
+ "options": [
85
+ "It helps improve memory and cognitive skills",
86
+ "It enables them to interact with technology through voice commands",
87
+ "It provides physical therapy",
88
+ "It helps improve vision and hearing abilities"
89
+ ],
90
+ "answer": "It enables them to interact with technology through voice commands"
91
+ },
92
+ {
93
+ "question": "Which speech recognition system developed by OpenAI is known for its state-of-the-art performance?",
94
+ "options": [
95
+ "Whisper",
96
+ "Roomba",
97
+ "Siri",
98
+ "Echo"
99
+ ],
100
+ "answer": "Whisper"
101
+ }
102
+ ]
pages/5_Quiz.py CHANGED
@@ -2,38 +2,22 @@ import streamlit as st
2
  from utils.levels import complete_level, render_page, initialize_level
3
  from utils.login import initialize_login
4
  import random
 
5
 
6
  LEVEL = 5
7
 
8
  initialize_login()
9
  initialize_level()
10
 
11
- questions = [
12
- {
13
- "question": "Which of the following best describes speech recognition?",
14
- "options": [
15
- "Teaching computers to understand human speech",
16
- "Teaching humans to understand computer languages",
17
- "Teaching computers to write code",
18
- "Teaching humans to speak multiple languages",
19
- ],
20
- "answer": "Teaching computers to understand human speech",
21
- },
22
- {
23
- "question": "What is one of the popular applications of speech recognition?",
24
- "options": [
25
- "Facial recognition",
26
- "Virtual reality gaming",
27
- "Voice assistants",
28
- "Emotion detection",
29
- ],
30
- "answer": "Voice assistants",
31
- },
32
- ]
33
  if "questions" not in st.session_state:
 
 
 
34
  for i in range(len(questions)):
35
  random.shuffle(questions[i]["options"])
36
  random.shuffle(questions)
 
37
  st.session_state["questions"] = questions
38
 
39
 
 
2
  from utils.levels import complete_level, render_page, initialize_level
3
  from utils.login import initialize_login
4
  import random
5
+ import json
6
 
7
  LEVEL = 5
8
 
9
  initialize_login()
10
  initialize_level()
11
 
12
+
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
13
  if "questions" not in st.session_state:
14
+ with open("assets/quiz.json") as f:
15
+ questions = json.load(f)
16
+
17
  for i in range(len(questions)):
18
  random.shuffle(questions[i]["options"])
19
  random.shuffle(questions)
20
+
21
  st.session_state["questions"] = questions
22
 
23