Spaces:
Sleeping
Sleeping
Commit
Β·
5c0f016
1
Parent(s):
dd352c7
added quiz materials
Browse files- .sessions/johndoe/level.txt +1 -0
- README.md +1 -1
- assets/quiz.json +102 -0
- pages/3_Training the Model.py +1 -1
- pages/5_Quiz.py +51 -0
- pages/{5_Congratulations.py β 6_Congratulations.py} +6 -3
- utils/__pycache__/login.cpython-310.pyc +0 -0
.sessions/johndoe/level.txt
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
6
|
README.md
CHANGED
|
@@ -6,7 +6,7 @@ colorTo: orange
|
|
| 6 |
sdk: streamlit
|
| 7 |
sdk_version: 1.21.0
|
| 8 |
app_file: 0_Introduction.py
|
| 9 |
-
pinned:
|
| 10 |
license: openrail
|
| 11 |
duplicated_from: aieye/aieye_tutorial_template
|
| 12 |
---
|
|
|
|
| 6 |
sdk: streamlit
|
| 7 |
sdk_version: 1.21.0
|
| 8 |
app_file: 0_Introduction.py
|
| 9 |
+
pinned: true
|
| 10 |
license: openrail
|
| 11 |
duplicated_from: aieye/aieye_tutorial_template
|
| 12 |
---
|
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/3_Training the Model.py
CHANGED
|
@@ -34,7 +34,7 @@ def step3_page():
|
|
| 34 |
"""
|
| 35 |
)
|
| 36 |
st.image(
|
| 37 |
-
"https://
|
| 38 |
use_column_width=True,
|
| 39 |
)
|
| 40 |
st.markdown(
|
|
|
|
| 34 |
"""
|
| 35 |
)
|
| 36 |
st.image(
|
| 37 |
+
"https://recfaces.com/wp-content/uploads/2021/03/rf-emotion-recognition-rf-830x495-1.jpeg",
|
| 38 |
use_column_width=True,
|
| 39 |
)
|
| 40 |
st.markdown(
|
pages/5_Quiz.py
ADDED
|
@@ -0,0 +1,51 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
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 |
+
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 |
+
|
| 24 |
+
def step_page():
|
| 25 |
+
st.header("Quiz")
|
| 26 |
+
st.markdown(
|
| 27 |
+
"""Now that you've learned about how Emotion Detection work, let's test your knowledge with a quiz!"""
|
| 28 |
+
)
|
| 29 |
+
|
| 30 |
+
for i in range(len(st.session_state["questions"])):
|
| 31 |
+
st.subheader(f"Question {i + 1}")
|
| 32 |
+
question = st.session_state["questions"][i]
|
| 33 |
+
st.markdown(question["question"])
|
| 34 |
+
answer = st.radio("Select an answer:", question["options"], key=f"radio{i}")
|
| 35 |
+
|
| 36 |
+
if st.session_state.get("EVALUATE", False):
|
| 37 |
+
if answer == question["answer"]:
|
| 38 |
+
st.success("Correct!")
|
| 39 |
+
else:
|
| 40 |
+
st.error("Incorrect! Try Again")
|
| 41 |
+
|
| 42 |
+
if st.button("Evaluate"):
|
| 43 |
+
st.session_state["EVALUATE"] = True
|
| 44 |
+
st.experimental_rerun()
|
| 45 |
+
|
| 46 |
+
st.info("Click on the button below to complete the tutorial!")
|
| 47 |
+
if st.button("Complete"):
|
| 48 |
+
complete_level(LEVEL)
|
| 49 |
+
|
| 50 |
+
|
| 51 |
+
render_page(step_page, LEVEL)
|
pages/{5_Congratulations.py β 6_Congratulations.py}
RENAMED
|
@@ -3,10 +3,13 @@ from utils.levels import render_page, initialize_level
|
|
| 3 |
|
| 4 |
initialize_level()
|
| 5 |
|
| 6 |
-
LEVEL =
|
|
|
|
| 7 |
|
| 8 |
def complete_page():
|
| 9 |
st.header("Congratulations!")
|
| 10 |
-
st.subheader("You have completed the tutorial!")
|
|
|
|
|
|
|
| 11 |
|
| 12 |
-
render_page(complete_page, LEVEL)
|
|
|
|
| 3 |
|
| 4 |
initialize_level()
|
| 5 |
|
| 6 |
+
LEVEL = 6
|
| 7 |
+
|
| 8 |
|
| 9 |
def complete_page():
|
| 10 |
st.header("Congratulations!")
|
| 11 |
+
st.subheader("You have completed the tutorial! Now You know how to build an emotion classifier!")
|
| 12 |
+
st.balloons()
|
| 13 |
+
|
| 14 |
|
| 15 |
+
render_page(complete_page, LEVEL)
|
utils/__pycache__/login.cpython-310.pyc
CHANGED
|
Binary files a/utils/__pycache__/login.cpython-310.pyc and b/utils/__pycache__/login.cpython-310.pyc differ
|
|
|