Spaces:
Sleeping
Sleeping
elibrowne
commited on
Commit
·
a9f88a1
1
Parent(s):
7ea5a5c
State?
Browse files
app.py
CHANGED
|
@@ -373,7 +373,7 @@ with gr.Blocks(theme = theme) as user_eval:
|
|
| 373 |
ud["current"] += 1
|
| 374 |
ud["responses"].append(cr) # adds new answers to current list of responses
|
| 375 |
update_huggingface(ud) # persistence — update progress online, save answers
|
| 376 |
-
cq, cr = load_current_question(ud
|
| 377 |
return {
|
| 378 |
selection: gr.Markdown("Advancing to the next question..."),
|
| 379 |
forward_btn: gr.Textbox("changed" + str(ud["current"])), # current forces event to trigger always
|
|
@@ -509,7 +509,7 @@ with gr.Blocks(theme = theme) as user_eval:
|
|
| 509 |
def submit_email(email):
|
| 510 |
loaded_data = load_user_data(email) # calls login, downloads data, initializes session
|
| 511 |
# After loading user data, update with current question
|
| 512 |
-
new_q, new_r = load_current_question(loaded_data
|
| 513 |
new_answers = new_q["answers"].copy()
|
| 514 |
new_answers[new_q["correct_answer_index"]] = "**" + new_q["answers"][new_q["correct_answer_index"]] + "** ✅"
|
| 515 |
return {
|
|
|
|
| 373 |
ud["current"] += 1
|
| 374 |
ud["responses"].append(cr) # adds new answers to current list of responses
|
| 375 |
update_huggingface(ud) # persistence — update progress online, save answers
|
| 376 |
+
cq, cr = load_current_question(ud)
|
| 377 |
return {
|
| 378 |
selection: gr.Markdown("Advancing to the next question..."),
|
| 379 |
forward_btn: gr.Textbox("changed" + str(ud["current"])), # current forces event to trigger always
|
|
|
|
| 509 |
def submit_email(email):
|
| 510 |
loaded_data = load_user_data(email) # calls login, downloads data, initializes session
|
| 511 |
# After loading user data, update with current question
|
| 512 |
+
new_q, new_r = load_current_question(loaded_data)
|
| 513 |
new_answers = new_q["answers"].copy()
|
| 514 |
new_answers[new_q["correct_answer_index"]] = "**" + new_q["answers"][new_q["correct_answer_index"]] + "** ✅"
|
| 515 |
return {
|