theodotus commited on
Commit
0e96afe
1 Parent(s): 227f4db

Restart test on the end

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -30,7 +30,7 @@ def question_interface(question_state, answer):
30
  name = f"Вітаємо, Ви {test.full_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)
@@ -50,7 +50,7 @@ def question_interface(question_state, answer):
50
 
51
 
52
  with gr.Blocks() as blocks:
53
- question_state = gr.State(value = {"value":-1, "responses":[]})
54
  gr.Markdown("<h1 style='text-align: center; margin-bottom: 1rem'>"
55
  + title
56
  + "</h1>")
 
30
  name = f"Вітаємо, Ви {test.full_names[best_id]}!"
31
  title = test.titles[best_id]
32
  image_path = test.get_photos_path(best_id)
33
+ return test.zero_state, name, radio, title, image_path
34
 
35
  # Display the current question
36
  question = test.get_question(current_question_index)
 
50
 
51
 
52
  with gr.Blocks() as blocks:
53
+ question_state = gr.State(value = test.zero_state)
54
  gr.Markdown("<h1 style='text-align: center; margin-bottom: 1rem'>"
55
  + title
56
  + "</h1>")