Spaces:
Sleeping
Sleeping
Commit
·
82f78ef
1
Parent(s):
16196d0
refactor: reorganize layout for earthquake alert report and waveform visualization
Browse files
app.py
CHANGED
|
@@ -964,25 +964,16 @@ with gr.Blocks(title="TTSAM 震度預測系統", fill_height=True) as demo:
|
|
| 964 |
|
| 965 |
# ========== 上層:使用說明與參數設定 ==========
|
| 966 |
with gr.Row():
|
| 967 |
-
# 左上:使用步驟與狀態顯示
|
| 968 |
with gr.Column(scale=1):
|
| 969 |
gr.Markdown("## 使用說明")
|
| 970 |
gr.Markdown(
|
| 971 |
"""
|
| 972 |
- **選擇地震事件**:自動載入測站並執行預測
|
| 973 |
- **調整時間滑桿**:即時更新波形與震度預測
|
| 974 |
-
|
| 975 |
系統會自動選擇距離震央最近的 25 個測站,並快取資料避免重複讀檔。
|
| 976 |
"""
|
| 977 |
)
|
| 978 |
-
gr.Markdown("## 警報資訊")
|
| 979 |
-
alert_textbox = gr.Textbox(
|
| 980 |
-
label="地震預警報告(≥ 4 級地區)",
|
| 981 |
-
lines=7,
|
| 982 |
-
max_lines=7,
|
| 983 |
-
interactive=False,
|
| 984 |
-
show_copy_button=False,
|
| 985 |
-
)
|
| 986 |
with gr.Column(scale=1):
|
| 987 |
event_dropdown = gr.Dropdown(
|
| 988 |
choices=list(earthquake_metadata.keys()),
|
|
@@ -992,9 +983,18 @@ with gr.Blocks(title="TTSAM 震度預測系統", fill_height=True) as demo:
|
|
| 992 |
duration_slider = gr.Slider(
|
| 993 |
2, 15, value=15, step=1, label="P 波後時間 (秒)"
|
| 994 |
)
|
| 995 |
-
|
| 996 |
-
|
| 997 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 998 |
|
| 999 |
# ========== 下層:合併地圖 vs 實際觀測 ==========
|
| 1000 |
with gr.Row():
|
|
|
|
| 964 |
|
| 965 |
# ========== 上層:使用說明與參數設定 ==========
|
| 966 |
with gr.Row():
|
|
|
|
| 967 |
with gr.Column(scale=1):
|
| 968 |
gr.Markdown("## 使用說明")
|
| 969 |
gr.Markdown(
|
| 970 |
"""
|
| 971 |
- **選擇地震事件**:自動載入測站並執行預測
|
| 972 |
- **調整時間滑桿**:即時更新波形與震度預測
|
| 973 |
+
|
| 974 |
系統會自動選擇距離震央最近的 25 個測站,並快取資料避免重複讀檔。
|
| 975 |
"""
|
| 976 |
)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 977 |
with gr.Column(scale=1):
|
| 978 |
event_dropdown = gr.Dropdown(
|
| 979 |
choices=list(earthquake_metadata.keys()),
|
|
|
|
| 983 |
duration_slider = gr.Slider(
|
| 984 |
2, 15, value=15, step=1, label="P 波後時間 (秒)"
|
| 985 |
)
|
| 986 |
+
with gr.Row(scale=1):
|
| 987 |
+
alert_textbox = gr.Textbox(
|
| 988 |
+
label="地震預警報告(≥ 4 級地區)",
|
| 989 |
+
lines=7,
|
| 990 |
+
max_lines=7,
|
| 991 |
+
interactive=False,
|
| 992 |
+
show_copy_button=False,
|
| 993 |
+
)
|
| 994 |
+
|
| 995 |
+
waveform_plot = gr.Plot(
|
| 996 |
+
label="地震波形(選定的 25 個測站)",
|
| 997 |
+
)
|
| 998 |
|
| 999 |
# ========== 下層:合併地圖 vs 實際觀測 ==========
|
| 1000 |
with gr.Row():
|