Sina Media Lab commited on
Commit
4f6051a
·
1 Parent(s): 3f6a54f
Files changed (1) hide show
  1. app.py +4 -1
app.py CHANGED
@@ -171,6 +171,9 @@ st.write(current_question["question"])
171
  # Display the Submit/Next click count
172
  st.write(f"Submit/Next button clicked {st.session_state.submit_click_count} time(s).")
173
 
 
 
 
174
  # Create the form for the question
175
  with st.form(key=f'question_form_{st.session_state.current_index}'):
176
  selected_answer = st.radio(
@@ -180,7 +183,7 @@ with st.form(key=f'question_form_{st.session_state.current_index}'):
180
  key=f"question_{st.session_state.current_index}_options"
181
  )
182
 
183
- submit_button = st.form_submit_button(label="Submit/Next")
184
 
185
  # Handle button state and answer submission
186
  if submit_button:
 
171
  # Display the Submit/Next click count
172
  st.write(f"Submit/Next button clicked {st.session_state.submit_click_count} time(s).")
173
 
174
+ # Determine the button label based on the click count
175
+ button_label = "Next" if st.session_state.submit_click_count > 1 else "Submit/Next"
176
+
177
  # Create the form for the question
178
  with st.form(key=f'question_form_{st.session_state.current_index}'):
179
  selected_answer = st.radio(
 
183
  key=f"question_{st.session_state.current_index}_options"
184
  )
185
 
186
+ submit_button = st.form_submit_button(label=button_label)
187
 
188
  # Handle button state and answer submission
189
  if submit_button: