Spaces:
Sleeping
Sleeping
elibrowne
commited on
Commit
·
7aceb13
1
Parent(s):
8c48d51
State?
Browse files
app.py
CHANGED
@@ -494,10 +494,9 @@ with gr.Blocks(theme = theme) as user_eval:
|
|
494 |
email.change(fn = sanitize_login, inputs = [email], outputs = [s])
|
495 |
|
496 |
def submit_email(email):
|
497 |
-
|
498 |
-
loaded_data = load_user_data(user_id) # calls login, downloads data, initializes session
|
499 |
# After loading user data, update with current question
|
500 |
-
new_q = load_current_question(loaded_data,
|
501 |
new_answers = new_q["answers"].copy()
|
502 |
new_answers[new_q["correct_answer_index"]] = "**" + new_q["answers"][new_q["correct_answer_index"]] + "** ✅"
|
503 |
return {
|
@@ -523,7 +522,7 @@ with gr.Blocks(theme = theme) as user_eval:
|
|
523 |
b: gr.Button(new_q["answers"][1]),
|
524 |
c: gr.Button(new_q["answers"][2]),
|
525 |
d: gr.Button(new_q["answers"][3]),
|
526 |
-
user_id:
|
527 |
user_data: loaded_data,
|
528 |
current_question: new_q
|
529 |
}
|
|
|
494 |
email.change(fn = sanitize_login, inputs = [email], outputs = [s])
|
495 |
|
496 |
def submit_email(email):
|
497 |
+
loaded_data = load_user_data(email) # calls login, downloads data, initializes session
|
|
|
498 |
# After loading user data, update with current question
|
499 |
+
new_q = load_current_question(loaded_data, email)
|
500 |
new_answers = new_q["answers"].copy()
|
501 |
new_answers[new_q["correct_answer_index"]] = "**" + new_q["answers"][new_q["correct_answer_index"]] + "** ✅"
|
502 |
return {
|
|
|
522 |
b: gr.Button(new_q["answers"][1]),
|
523 |
c: gr.Button(new_q["answers"][2]),
|
524 |
d: gr.Button(new_q["answers"][3]),
|
525 |
+
user_id: email,
|
526 |
user_data: loaded_data,
|
527 |
current_question: new_q
|
528 |
}
|