Spaces:
Sleeping
Sleeping
update
Browse files- app.py +1 -0
- backend1.py +6 -2
app.py
CHANGED
@@ -199,6 +199,7 @@ with gr.Blocks() as demo:
|
|
199 |
home_button.click(fn=return_home, inputs=None, outputs=[
|
200 |
title, description, exam_selector, start_button,
|
201 |
audio_checkbox, # Ensure the checkbox visibility is updated
|
|
|
202 |
question_text, question_text, choices, answer_button,
|
203 |
next_button, prev_button, home_button, question_state, result_text, explanation_text, explain_button
|
204 |
])
|
|
|
199 |
home_button.click(fn=return_home, inputs=None, outputs=[
|
200 |
title, description, exam_selector, start_button,
|
201 |
audio_checkbox, # Ensure the checkbox visibility is updated
|
202 |
+
start_question_slider, # Ensure the slider is shown
|
203 |
question_text, question_text, choices, answer_button,
|
204 |
next_button, prev_button, home_button, question_state, result_text, explanation_text, explain_button
|
205 |
])
|
backend1.py
CHANGED
@@ -123,8 +123,12 @@ def handle_previous(index, audio_enabled):
|
|
123 |
# Function to return to the home page
|
124 |
def return_home():
|
125 |
return (
|
126 |
-
gr.update(visible=True),
|
127 |
-
gr.update(visible=True),
|
|
|
|
|
|
|
|
|
128 |
gr.update(visible=False), gr.update(visible=False), gr.update(visible=False), gr.update(visible=False),
|
129 |
gr.update(visible=False), gr.update(visible=False), gr.update(visible=False), "", ""
|
130 |
)
|
|
|
123 |
# Function to return to the home page
|
124 |
def return_home():
|
125 |
return (
|
126 |
+
gr.update(visible=True),
|
127 |
+
gr.update(visible=True),
|
128 |
+
gr.update(visible=True),
|
129 |
+
gr.update(visible=True),
|
130 |
+
gr.update(visible=True), # Show the audio_checkbox
|
131 |
+
gr.update(visible=True), # Show question slider
|
132 |
gr.update(visible=False), gr.update(visible=False), gr.update(visible=False), gr.update(visible=False),
|
133 |
gr.update(visible=False), gr.update(visible=False), gr.update(visible=False), "", ""
|
134 |
)
|