Spaces:
Sleeping
Sleeping
Update ui/layouts.py
Browse files- ui/layouts.py +6 -5
ui/layouts.py
CHANGED
|
@@ -55,12 +55,14 @@ def create_ui(visit_count_html: str, theme: gr.Theme):
|
|
| 55 |
.instruction-card p, .instruction-card ul {
|
| 56 |
font-size: 1.1rem;
|
| 57 |
color: #34495e;
|
|
|
|
| 58 |
}
|
| 59 |
.instruction-card code {
|
| 60 |
background-color: #e9ecef;
|
| 61 |
-
padding:
|
| 62 |
-
border-radius:
|
| 63 |
font-size: 1rem;
|
|
|
|
| 64 |
}
|
| 65 |
@media (max-width: 768px) {
|
| 66 |
.custom-header { padding: 3rem 1rem; border-radius: 0; }
|
|
@@ -113,7 +115,7 @@ def create_ui(visit_count_html: str, theme: gr.Theme):
|
|
| 113 |
seismo_plot_output = gr.Plot(label="震波圖輸出")
|
| 114 |
seismo_console_output = gr.Textbox(label="執行結果 / 錯誤訊息", lines=8, interactive=False)
|
| 115 |
|
| 116 |
-
# --- ✨
|
| 117 |
with gr.TabItem("❓ AI 助教說明"):
|
| 118 |
gr.Markdown("## 🤖 AI 課程助教使用指南")
|
| 119 |
gr.Markdown("歡迎使用課程 AI 助教!我整合了課程知識庫與多種即時資訊來源,您可以透過多種方式與我互動。")
|
|
@@ -146,7 +148,7 @@ def create_ui(visit_count_html: str, theme: gr.Theme):
|
|
| 146 |
|
| 147 |
<div class="instruction-card">
|
| 148 |
<h3>🔎 進階地震查詢</h3>
|
| 149 |
-
<p
|
| 150 |
<ul>
|
| 151 |
<li><code>查詢 2024-04-01 到 2024-04-07 規模 6.0 以上地震</code></li>
|
| 152 |
</ul>
|
|
@@ -155,7 +157,6 @@ def create_ui(visit_count_html: str, theme: gr.Theme):
|
|
| 155 |
"""
|
| 156 |
)
|
| 157 |
|
| 158 |
-
# --- ✨ 2. 簡化後的「AI 課程助教」主分頁 ---
|
| 159 |
with gr.TabItem("🤖 AI 課程助教"):
|
| 160 |
with gr.Group():
|
| 161 |
gr.Markdown("### 🤖 AI 課程助教")
|
|
|
|
| 55 |
.instruction-card p, .instruction-card ul {
|
| 56 |
font-size: 1.1rem;
|
| 57 |
color: #34495e;
|
| 58 |
+
line-height: 1.8;
|
| 59 |
}
|
| 60 |
.instruction-card code {
|
| 61 |
background-color: #e9ecef;
|
| 62 |
+
padding: 4px 8px;
|
| 63 |
+
border-radius: 5px;
|
| 64 |
font-size: 1rem;
|
| 65 |
+
color: #c7254e;
|
| 66 |
}
|
| 67 |
@media (max-width: 768px) {
|
| 68 |
.custom-header { padding: 3rem 1rem; border-radius: 0; }
|
|
|
|
| 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 助教!我整合了課程知識庫與多種即時資訊來源,您可以透過多種方式與我互動。")
|
|
|
|
| 148 |
|
| 149 |
<div class="instruction-card">
|
| 150 |
<h3>🔎 進階地震查詢</h3>
|
| 151 |
+
<p>您可以指定<b>日期範圍</b>與<b>規模</b>來查詢全球地震紀錄。輸入快捷指令 <code>#7</code> 可以查看格式說明,或直接依照以下格式提問:</p>
|
| 152 |
<ul>
|
| 153 |
<li><code>查詢 2024-04-01 到 2024-04-07 規模 6.0 以上地震</code></li>
|
| 154 |
</ul>
|
|
|
|
| 157 |
"""
|
| 158 |
)
|
| 159 |
|
|
|
|
| 160 |
with gr.TabItem("🤖 AI 課程助教"):
|
| 161 |
with gr.Group():
|
| 162 |
gr.Markdown("### 🤖 AI 課程助教")
|