cwadayi commited on
Commit
8f70f76
·
verified ·
1 Parent(s): b206b16

Update ui/layouts.py

Browse files
Files changed (1) hide show
  1. ui/layouts.py +4 -4
ui/layouts.py CHANGED
@@ -77,10 +77,11 @@ def create_ui(visit_count_html: str, theme: gr.Theme):
77
  """
78
  )
79
 
80
- # --- 主導覽列 Tab 容器 ---
81
- with gr.Tabs(selected=0):
82
 
83
- with gr.TabItem("🎯 課程目標"):
 
84
  gr.Markdown(content.course_goals_md)
85
 
86
  with gr.TabItem("🗓️ 課程進度"):
@@ -115,7 +116,6 @@ def create_ui(visit_count_html: str, theme: gr.Theme):
115
  seismo_plot_output = gr.Plot(label="震波圖輸出")
116
  seismo_console_output = gr.Textbox(label="執行結果 / 錯誤訊息", lines=8, interactive=False)
117
 
118
- # --- ✨ 以下是修改後的「AI 助教說明」分頁 ---
119
  with gr.TabItem("❓ AI 助教說明"):
120
  gr.Markdown("## 🤖 AI 課程助教使用指南")
121
  gr.Markdown("歡迎使用課程 AI 助教!我整合了課程知識庫與多種即時資訊來源,您可以透過多種方式與我互動。")
 
77
  """
78
  )
79
 
80
+ # --- 修改 Tabs 容器,使用 id 進行預設選擇 ---
81
+ with gr.Tabs(selected="goals_tab"):
82
 
83
+ # --- ✨ 為預設分頁加上對應的 id ---
84
+ with gr.TabItem("🎯 課程目標", id="goals_tab"):
85
  gr.Markdown(content.course_goals_md)
86
 
87
  with gr.TabItem("🗓️ 課程進度"):
 
116
  seismo_plot_output = gr.Plot(label="震波圖輸出")
117
  seismo_console_output = gr.Textbox(label="執行結果 / 錯誤訊息", lines=8, interactive=False)
118
 
 
119
  with gr.TabItem("❓ AI 助教說明"):
120
  gr.Markdown("## 🤖 AI 課程助教使用指南")
121
  gr.Markdown("歡迎使用課程 AI 助教!我整合了課程知識庫與多種即時資訊來源,您可以透過多種方式與我互動。")