elibrowne commited on
Commit
9815e83
·
1 Parent(s): 8208240
Files changed (1) hide show
  1. app.py +7 -1
app.py CHANGED
@@ -261,8 +261,11 @@ with gr.Blocks(theme = theme) as user_eval:
261
  def next_p(e0, e1, e2, e3, cur_step, mode, cr):
262
  step = cur_step + 1
263
  # Add user data to the current response
264
- print(list(cr.values())[0])
 
265
  cr["e5_scores"].append([e0, e1, e2, e3])
 
 
266
  # Next item
267
  if step >= len(current_question["top10_e5"]): # should always be 10 (DEBUG: >= to avoid out of bounds)
268
  # Step 10: all sources
@@ -399,6 +402,7 @@ with gr.Blocks(theme = theme) as user_eval:
399
  # I know this is inefficient...
400
  def answer_a(cr):
401
  # cr = current_response
 
402
  cr["user_answer"] = 0
403
  return {
404
  question: gr.Row(visible = False),
@@ -417,6 +421,7 @@ with gr.Blocks(theme = theme) as user_eval:
417
  }
418
  def answer_c(cr):
419
  # cr = current_response
 
420
  cr["user_answer"] = 2
421
  return {
422
  question: gr.Row(visible = False),
@@ -425,6 +430,7 @@ with gr.Blocks(theme = theme) as user_eval:
425
  }
426
  def answer_d(cr):
427
  # cr = current_response
 
428
  cr["user_answer"] = 3
429
  return {
430
  question: gr.Row(visible = False),
 
261
  def next_p(e0, e1, e2, e3, cur_step, mode, cr):
262
  step = cur_step + 1
263
  # Add user data to the current response
264
+ print(cr)
265
+ print(cr.values())
266
  cr["e5_scores"].append([e0, e1, e2, e3])
267
+ print(cr)
268
+ print(cr.values())
269
  # Next item
270
  if step >= len(current_question["top10_e5"]): # should always be 10 (DEBUG: >= to avoid out of bounds)
271
  # Step 10: all sources
 
402
  # I know this is inefficient...
403
  def answer_a(cr):
404
  # cr = current_response
405
+ cr = list(cr.values())[0]
406
  cr["user_answer"] = 0
407
  return {
408
  question: gr.Row(visible = False),
 
421
  }
422
  def answer_c(cr):
423
  # cr = current_response
424
+ cr = list(cr.values())[0]
425
  cr["user_answer"] = 2
426
  return {
427
  question: gr.Row(visible = False),
 
430
  }
431
  def answer_d(cr):
432
  # cr = current_response
433
+ cr = list(cr.values())[0]
434
  cr["user_answer"] = 3
435
  return {
436
  question: gr.Row(visible = False),