Starchik1 commited on
Commit
e6c03ed
·
verified ·
1 Parent(s): 74e6007

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -2
app.py CHANGED
@@ -53,7 +53,7 @@ def iq_test():
53
  st.session_state.responses.append({"question": current_q["question"], "selected": option, "correct": options[correct_answer - 1]})
54
  # Переход к следующему вопросу
55
  st.session_state.current_question += 1
56
- st.experimental_rerun() # Перезагрузка страницы для следующего вопроса
57
  else:
58
  # Вывод результатов в конце теста
59
  st.header("Тест завершен!")
@@ -86,7 +86,6 @@ def iq_test():
86
  st.session_state.current_question = 0
87
  st.session_state.score = 0
88
  st.session_state.responses = []
89
- st.experimental_rerun() # Перезагрузка для сброса состояния
90
 
91
  if __name__ == "__main__":
92
  st.title("IQ тест")
 
53
  st.session_state.responses.append({"question": current_q["question"], "selected": option, "correct": options[correct_answer - 1]})
54
  # Переход к следующему вопросу
55
  st.session_state.current_question += 1
56
+
57
  else:
58
  # Вывод результатов в конце теста
59
  st.header("Тест завершен!")
 
86
  st.session_state.current_question = 0
87
  st.session_state.score = 0
88
  st.session_state.responses = []
 
89
 
90
  if __name__ == "__main__":
91
  st.title("IQ тест")