Spaces:
Sleeping
Sleeping
Add CSS-based hiding for main_app to fix HF Space visibility bug
Browse files
app.py
CHANGED
|
@@ -702,7 +702,17 @@ def submit_viva_answer(answer, questions, current_q_idx, student_name=""):
|
|
| 702 |
|
| 703 |
|
| 704 |
# Create Gradio interface
|
| 705 |
-
with gr.Blocks(
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 706 |
# State variables
|
| 707 |
student_name_state = gr.State("")
|
| 708 |
viva_questions_state = gr.State([])
|
|
@@ -755,7 +765,7 @@ with gr.Blocks(title="AnatomyBot - MBBS Anatomy Tutor") as demo:
|
|
| 755 |
pass # Empty column for centering
|
| 756 |
|
| 757 |
# Main Application (hidden initially)
|
| 758 |
-
with gr.Column(visible=False) as main_app:
|
| 759 |
gr.Markdown(
|
| 760 |
"""
|
| 761 |
# 🩺 AnatomyBot - Your MBBS Anatomy Tutor
|
|
|
|
| 702 |
|
| 703 |
|
| 704 |
# Create Gradio interface
|
| 705 |
+
with gr.Blocks(
|
| 706 |
+
title="AnatomyBot - MBBS Anatomy Tutor",
|
| 707 |
+
css="""
|
| 708 |
+
#main_app_container {
|
| 709 |
+
display: none !important;
|
| 710 |
+
}
|
| 711 |
+
#main_app_container.visible {
|
| 712 |
+
display: flex !important;
|
| 713 |
+
}
|
| 714 |
+
"""
|
| 715 |
+
) as demo:
|
| 716 |
# State variables
|
| 717 |
student_name_state = gr.State("")
|
| 718 |
viva_questions_state = gr.State([])
|
|
|
|
| 765 |
pass # Empty column for centering
|
| 766 |
|
| 767 |
# Main Application (hidden initially)
|
| 768 |
+
with gr.Column(visible=False, elem_id="main_app_container") as main_app:
|
| 769 |
gr.Markdown(
|
| 770 |
"""
|
| 771 |
# 🩺 AnatomyBot - Your MBBS Anatomy Tutor
|