Spaces:
Sleeping
Sleeping
Use photos
Browse files
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 |
-
|
29 |
radio = gr.Radio.update(choices = [], value = None)
|
30 |
-
|
|
|
|
|
|
|
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)
|