elibrowne commited on
Commit
87c5ef7
1 Parent(s): 3684a21

Transition between questions

Browse files
Files changed (1) hide show
  1. app.py +7 -2
app.py CHANGED
@@ -331,16 +331,21 @@ with gr.Blocks(theme = theme) as user_eval:
331
  question: gr.Row(visible = False),
332
  }
333
  else:
334
- mode = 0 # reset mode to 0, will restart with new Q, first set of Ps
335
  print("New question")
336
  return {
337
  scores_p: gr.Column(visible = True),
338
  scores_g: gr.Column(visible = False),
339
  evals: gr.Row(visible = False),
340
  question: gr.Row(visible = True),
 
 
 
 
 
341
  }
342
 
343
- forward_btn.change(fn = toggle, inputs = None, outputs = [scores_p, scores_g, evals, question])
344
 
345
  with gr.Row() as login:
346
  with gr.Column():
 
331
  question: gr.Row(visible = False),
332
  }
333
  else:
334
+ mode = 0 # reset mode to 0, will restart with new Q (set up new Q), first set of Ps
335
  print("New question")
336
  return {
337
  scores_p: gr.Column(visible = True),
338
  scores_g: gr.Column(visible = False),
339
  evals: gr.Row(visible = False),
340
  question: gr.Row(visible = True),
341
+ q_text: gr.Markdown(current_question["question"]),
342
+ a: gr.Button(current_question["answers"][0]),
343
+ b: gr.Button(current_question["answers"][1]),
344
+ c: gr.Button(current_question["answers"][2]),
345
+ d: gr.Button(current_question["answers"][3])
346
  }
347
 
348
+ forward_btn.change(fn = toggle, inputs = None, outputs = [scores_p, scores_g, evals, question, q_text, a, b, c, d])
349
 
350
  with gr.Row() as login:
351
  with gr.Column():