Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -1045,34 +1045,34 @@ with gr.Blocks(title="통합 조위 예측 시스템", theme=gr.themes.Soft()) a
|
|
| 1045 |
""")
|
| 1046 |
|
| 1047 |
with gr.Row():
|
| 1048 |
-
|
| 1049 |
-
|
| 1050 |
-
|
| 1051 |
-
|
| 1052 |
-
|
| 1053 |
-
|
| 1054 |
-
|
| 1055 |
-
|
| 1056 |
-
|
| 1057 |
-
|
| 1058 |
-
|
| 1059 |
-
|
| 1060 |
-
|
| 1061 |
-
|
| 1062 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1063 |
)
|
| 1064 |
-
|
| 1065 |
-
hist_btn = gr.Button("조회", variant="primary")
|
| 1066 |
-
|
| 1067 |
-
with gr.Column():
|
| 1068 |
-
hist_output = gr.JSON(label="조회 결과")
|
| 1069 |
-
|
| 1070 |
-
hist_btn.click(
|
| 1071 |
-
fn=api_get_historical_tide,
|
| 1072 |
-
inputs=[hist_station, hist_date, hist_hours],
|
| 1073 |
-
outputs=hist_output,
|
| 1074 |
-
api_name="historical_tide"
|
| 1075 |
-
)
|
| 1076 |
|
| 1077 |
# 과거 만조/간조
|
| 1078 |
with gr.Row():
|
|
|
|
| 1045 |
""")
|
| 1046 |
|
| 1047 |
with gr.Row():
|
| 1048 |
+
with gr.Column():
|
| 1049 |
+
hist_station = gr.Dropdown(
|
| 1050 |
+
choices=[(f"{STATION_NAMES[s]} ({s})", s) for s in STATIONS],
|
| 1051 |
+
label="관측소 선택",
|
| 1052 |
+
value=STATIONS[0]
|
| 1053 |
+
)
|
| 1054 |
+
hist_date = gr.Textbox(
|
| 1055 |
+
label="날짜 (YYYY-MM-DD)",
|
| 1056 |
+
value=datetime.now().strftime("%Y-%m-%d")
|
| 1057 |
+
)
|
| 1058 |
+
hist_hours = gr.Number(
|
| 1059 |
+
label="조회 시간 (시간)",
|
| 1060 |
+
value=24,
|
| 1061 |
+
minimum=1,
|
| 1062 |
+
maximum=168
|
| 1063 |
+
)
|
| 1064 |
+
|
| 1065 |
+
hist_btn = gr.Button("조회", variant="primary")
|
| 1066 |
+
|
| 1067 |
+
with gr.Column():
|
| 1068 |
+
hist_output = gr.JSON(label="조회 결과")
|
| 1069 |
+
|
| 1070 |
+
hist_btn.click(
|
| 1071 |
+
fn=api_get_historical_tide,
|
| 1072 |
+
inputs=[hist_station, hist_date, hist_hours],
|
| 1073 |
+
outputs=hist_output,
|
| 1074 |
+
api_name="historical_tide"
|
| 1075 |
)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1076 |
|
| 1077 |
# 과거 만조/간조
|
| 1078 |
with gr.Row():
|