Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -216,8 +216,8 @@ with gr.Blocks() as demo:
|
|
216 |
|
217 |
# Connect the quiz buttons to their functions
|
218 |
answer_button.click(fn=handle_answer, inputs=[question_state, choices, audio_checkbox, current_audio_state], outputs=[result_text, answer_audio, current_audio_state])
|
219 |
-
next_button.click(fn=handle_next, inputs=[question_state,
|
220 |
-
prev_button.click(fn=handle_previous, inputs=[question_state,
|
221 |
|
222 |
explain_button.click(fn=show_explanation, inputs=[question_state], outputs=[explanation_text, result_text, explanation_text]) # Corrected output to explanation_text for the last element which was incorrectly result_text
|
223 |
|
|
|
216 |
|
217 |
# Connect the quiz buttons to their functions
|
218 |
answer_button.click(fn=handle_answer, inputs=[question_state, choices, audio_checkbox, current_audio_state], outputs=[result_text, answer_audio, current_audio_state])
|
219 |
+
next_button.click(fn=handle_next, inputs=[question_state, audio_checkbox], outputs=[question_text, choices, question_state, result_text, question_audio, explanation_text, result_text]) # Corrected input to audio_checkbox
|
220 |
+
prev_button.click(fn=handle_previous, inputs=[question_state, audio_checkbox], outputs=[question_text, choices, question_state, result_text, question_audio, explanation_text, result_text]) # Corrected input to audio_checkbox
|
221 |
|
222 |
explain_button.click(fn=show_explanation, inputs=[question_state], outputs=[explanation_text, result_text, explanation_text]) # Corrected output to explanation_text for the last element which was incorrectly result_text
|
223 |
|