Spaces:
Sleeping
Sleeping
Add elem_id to tabs to fix navigation bar duplication
Browse files
app.py
CHANGED
|
@@ -794,9 +794,9 @@ with gr.Blocks(title="AnatomyBot - MBBS Anatomy Tutor") as demo:
|
|
| 794 |
student_name_display = gr.Markdown("")
|
| 795 |
|
| 796 |
# Tabs are inside main_app so they're hidden initially
|
| 797 |
-
with gr.Tabs() as tabs:
|
| 798 |
# LEARNING MODE TAB
|
| 799 |
-
with gr.Tab("π Learning Mode"):
|
| 800 |
# Search and examples at the top
|
| 801 |
with gr.Row():
|
| 802 |
query_input = gr.Textbox(
|
|
@@ -842,7 +842,7 @@ with gr.Blocks(title="AnatomyBot - MBBS Anatomy Tutor") as demo:
|
|
| 842 |
image_output = gr.Image(label="πΌοΈ Anatomy Diagram", type="pil")
|
| 843 |
|
| 844 |
# VIVA MODE TAB (Defined before Book Mode to allow component access)
|
| 845 |
-
with gr.Tab("π― VIVA Training Mode") as viva_tab:
|
| 846 |
viva_status = gr.Markdown("Click 'Start VIVA Training' from Learning Mode after studying a topic!")
|
| 847 |
|
| 848 |
# Additional greeting component (initially hidden)
|
|
@@ -871,7 +871,7 @@ with gr.Blocks(title="AnatomyBot - MBBS Anatomy Tutor") as demo:
|
|
| 871 |
feedback_display = gr.Markdown("Feedback will appear here after you submit your answer")
|
| 872 |
|
| 873 |
# BOOK LEARNING MODE TAB
|
| 874 |
-
with gr.Tab("π Book Learning Mode") as book_tab:
|
| 875 |
# Upload PDF
|
| 876 |
pdf_upload = gr.File(label="Upload Anatomy Textbook (PDF)", file_types=[".pdf"], type="binary")
|
| 877 |
upload_status = gr.Markdown()
|
|
@@ -964,7 +964,7 @@ with gr.Blocks(title="AnatomyBot - MBBS Anatomy Tutor") as demo:
|
|
| 964 |
)
|
| 965 |
|
| 966 |
# ADMIN PANEL TAB
|
| 967 |
-
with gr.Tab("π Admin Panel") as admin_tab:
|
| 968 |
gr.Markdown("## Admin Panel - Student Database")
|
| 969 |
gr.Markdown("Enter the admin password to view registered students.")
|
| 970 |
|
|
|
|
| 794 |
student_name_display = gr.Markdown("")
|
| 795 |
|
| 796 |
# Tabs are inside main_app so they're hidden initially
|
| 797 |
+
with gr.Tabs(elem_id="main_tabs") as tabs:
|
| 798 |
# LEARNING MODE TAB
|
| 799 |
+
with gr.Tab("π Learning Mode", elem_id="tab_learning"):
|
| 800 |
# Search and examples at the top
|
| 801 |
with gr.Row():
|
| 802 |
query_input = gr.Textbox(
|
|
|
|
| 842 |
image_output = gr.Image(label="πΌοΈ Anatomy Diagram", type="pil")
|
| 843 |
|
| 844 |
# VIVA MODE TAB (Defined before Book Mode to allow component access)
|
| 845 |
+
with gr.Tab("π― VIVA Training Mode", elem_id="tab_viva") as viva_tab:
|
| 846 |
viva_status = gr.Markdown("Click 'Start VIVA Training' from Learning Mode after studying a topic!")
|
| 847 |
|
| 848 |
# Additional greeting component (initially hidden)
|
|
|
|
| 871 |
feedback_display = gr.Markdown("Feedback will appear here after you submit your answer")
|
| 872 |
|
| 873 |
# BOOK LEARNING MODE TAB
|
| 874 |
+
with gr.Tab("π Book Learning Mode", elem_id="tab_book") as book_tab:
|
| 875 |
# Upload PDF
|
| 876 |
pdf_upload = gr.File(label="Upload Anatomy Textbook (PDF)", file_types=[".pdf"], type="binary")
|
| 877 |
upload_status = gr.Markdown()
|
|
|
|
| 964 |
)
|
| 965 |
|
| 966 |
# ADMIN PANEL TAB
|
| 967 |
+
with gr.Tab("π Admin Panel", elem_id="tab_admin") as admin_tab:
|
| 968 |
gr.Markdown("## Admin Panel - Student Database")
|
| 969 |
gr.Markdown("Enter the admin password to view registered students.")
|
| 970 |
|