Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -182,12 +182,13 @@ with gr.Blocks() as demo:
|
|
182 |
outputs=[
|
183 |
title, description, exam_selector, start_button,
|
184 |
audio_checkbox, # Ensure the checkbox visibility is updated
|
|
|
185 |
question_text, question_text, choices, answer_button,
|
186 |
next_button, prev_button, home_button, question_state, result_text, question_audio,
|
187 |
-
explain_button, current_audio_state # Add current_audio_state to the outputs
|
188 |
]
|
189 |
)
|
190 |
-
|
191 |
# Connect the quiz buttons to their functions
|
192 |
answer_button.click(fn=handle_answer, inputs=[question_state, choices, audio_checkbox, current_audio_state], outputs=[result_text, answer_audio, current_audio_state])
|
193 |
next_button.click(fn=handle_next, inputs=[question_state, audio_checkbox], outputs=[question_text, choices, question_state, result_text, question_audio, explanation_text])
|
|
|
182 |
outputs=[
|
183 |
title, description, exam_selector, start_button,
|
184 |
audio_checkbox, # Ensure the checkbox visibility is updated
|
185 |
+
start_question_slider, # Ensure the slider is hidden
|
186 |
question_text, question_text, choices, answer_button,
|
187 |
next_button, prev_button, home_button, question_state, result_text, question_audio,
|
188 |
+
explain_button, result_text, current_audio_state # Add current_audio_state to the outputs
|
189 |
]
|
190 |
)
|
191 |
+
|
192 |
# Connect the quiz buttons to their functions
|
193 |
answer_button.click(fn=handle_answer, inputs=[question_state, choices, audio_checkbox, current_audio_state], outputs=[result_text, answer_audio, current_audio_state])
|
194 |
next_button.click(fn=handle_next, inputs=[question_state, audio_checkbox], outputs=[question_text, choices, question_state, result_text, question_audio, explanation_text])
|