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

Transition between questions

Browse files
Files changed (1) hide show
  1. app.py +1 -2
app.py CHANGED
@@ -218,6 +218,7 @@ with gr.Blocks(theme = theme) as user_eval:
218
  def next_g(e_h, e_s):
219
  global step
220
  global mode
 
221
  step += 1
222
  print(e_h + e_s)
223
  if step == 11:
@@ -261,7 +262,6 @@ with gr.Blocks(theme = theme) as user_eval:
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 {
@@ -282,7 +282,6 @@ with gr.Blocks(theme = theme) as user_eval:
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 {
 
218
  def next_g(e_h, e_s):
219
  global step
220
  global mode
221
+ global user_data
222
  step += 1
223
  print(e_h + e_s)
224
  if step == 11:
 
262
  eval_satisfied: gr.Slider(value = 1)
263
  }
264
  else:
 
265
  user_data["current"] += 1
266
  load_current_question()
267
  return {
 
282
  eval_satisfied: gr.Slider(value = 1)
283
  }
284
  # When mode is 1 -> change question
 
285
  user_data["current"] += 1
286
  load_current_question()
287
  return {