theodotus commited on
Commit
7488be8
·
1 Parent(s): d51055e

Use photos

Browse files
Files changed (1) hide show
  1. app.py +5 -2
app.py CHANGED
@@ -25,9 +25,12 @@ def question_interface(question_state, answer):
25
  if current_question_index == len(test):
26
  # Show all responses
27
  answer_ids = test.convert_to_answer_ids(question_state["responses"])
28
- best_name = test.select_best(answer_ids)
29
  radio = gr.Radio.update(choices = [], value = None)
30
- return None, None, radio, best_name, None
 
 
 
31
 
32
  # Display the current question
33
  question = test.get_question(current_question_index)
 
25
  if current_question_index == len(test):
26
  # Show all responses
27
  answer_ids = test.convert_to_answer_ids(question_state["responses"])
28
+ best_id = test.select_best(answer_ids)
29
  radio = gr.Radio.update(choices = [], value = None)
30
+ name = test.names[best_id]
31
+ title = test.titles[best_id]
32
+ image_path = test.get_photos_path(best_id)
33
+ return None, name, radio, title, image_path
34
 
35
  # Display the current question
36
  question = test.get_question(current_question_index)