Spaces:
Sleeping
Sleeping
elibrowne
commited on
Commit
·
3684a21
1
Parent(s):
c4db214
Transition between questions
Browse files
app.py
CHANGED
@@ -104,6 +104,7 @@ with open("question_data.json", "r") as f:
|
|
104 |
def load_current_question():
|
105 |
global current_question
|
106 |
q_index = user_data["current"]
|
|
|
107 |
qid = user_data["order"][q_index]
|
108 |
current_question = all_questions[qid]
|
109 |
|
@@ -262,7 +263,9 @@ with gr.Blocks(theme = theme) as user_eval:
|
|
262 |
eval_satisfied: gr.Slider(value = 1)
|
263 |
}
|
264 |
else:
|
|
|
265 |
user_data["current"] += 1
|
|
|
266 |
load_current_question()
|
267 |
return {
|
268 |
selection: gr.Markdown("Advancing to the next question..."),
|
|
|
104 |
def load_current_question():
|
105 |
global current_question
|
106 |
q_index = user_data["current"]
|
107 |
+
print(q_index)
|
108 |
qid = user_data["order"][q_index]
|
109 |
current_question = all_questions[qid]
|
110 |
|
|
|
263 |
eval_satisfied: gr.Slider(value = 1)
|
264 |
}
|
265 |
else:
|
266 |
+
print(user_data["current"])
|
267 |
user_data["current"] += 1
|
268 |
+
print(user_data["current"])
|
269 |
load_current_question()
|
270 |
return {
|
271 |
selection: gr.Markdown("Advancing to the next question..."),
|