elibrowne commited on
Commit
6830d35
·
1 Parent(s): 75e0da4

Transition between questions

Browse files
Files changed (1) hide show
  1. app.py +6 -0
app.py CHANGED
@@ -261,6 +261,9 @@ with gr.Blocks(theme = theme) as user_eval:
261
  eval_satisfied: gr.Slider(value = 1)
262
  }
263
  else:
 
 
 
264
  return {
265
  selection: gr.Markdown("Advancing to the next question..."),
266
  forward_btn: gr.Textbox("changed"),
@@ -279,6 +282,9 @@ with gr.Blocks(theme = theme) as user_eval:
279
  eval_satisfied: gr.Slider(value = 1)
280
  }
281
  # When mode is 1 -> change question
 
 
 
282
  return {
283
  selection: gr.Markdown("Advancing to the next question..."),
284
  forward_btn: gr.Textbox("changed"),
 
261
  eval_satisfied: gr.Slider(value = 1)
262
  }
263
  else:
264
+ global user_data
265
+ user_data["current"] += 1
266
+ load_current_question()
267
  return {
268
  selection: gr.Markdown("Advancing to the next question..."),
269
  forward_btn: gr.Textbox("changed"),
 
282
  eval_satisfied: gr.Slider(value = 1)
283
  }
284
  # When mode is 1 -> change question
285
+ global user_data
286
+ user_data["current"] += 1
287
+ load_current_question()
288
  return {
289
  selection: gr.Markdown("Advancing to the next question..."),
290
  forward_btn: gr.Textbox("changed"),