Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -26,12 +26,14 @@ def start_exam(exam_choice, start_question, audio_enabled):
|
|
26 |
# Hide start screen elements
|
27 |
gr.update(visible=False), gr.update(visible=False), gr.update(visible=False), gr.update(visible=False),
|
28 |
gr.update(visible=False), # Hide the audio_checkbox
|
|
|
29 |
# Show quiz elements
|
30 |
gr.update(visible=True), question, gr.update(choices=options, visible=True), gr.update(visible=True),
|
31 |
gr.update(visible=True), gr.update(visible=True), gr.update(visible=True), start_question, "", audio_path, gr.update(visible=True),
|
32 |
gr.update(visible=True), None # None for the audio stop signal
|
33 |
)
|
34 |
|
|
|
35 |
def display_question(index, audio_enabled):
|
36 |
"""Displays a question with options and generates audio (if enabled)."""
|
37 |
if index < 0 or index >= len(selected_questions):
|
|
|
26 |
# Hide start screen elements
|
27 |
gr.update(visible=False), gr.update(visible=False), gr.update(visible=False), gr.update(visible=False),
|
28 |
gr.update(visible=False), # Hide the audio_checkbox
|
29 |
+
gr.update(visible=False), # Hide the start_question_slider
|
30 |
# Show quiz elements
|
31 |
gr.update(visible=True), question, gr.update(choices=options, visible=True), gr.update(visible=True),
|
32 |
gr.update(visible=True), gr.update(visible=True), gr.update(visible=True), start_question, "", audio_path, gr.update(visible=True),
|
33 |
gr.update(visible=True), None # None for the audio stop signal
|
34 |
)
|
35 |
|
36 |
+
|
37 |
def display_question(index, audio_enabled):
|
38 |
"""Displays a question with options and generates audio (if enabled)."""
|
39 |
if index < 0 or index >= len(selected_questions):
|