Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -75,17 +75,23 @@ with gr.Blocks(theme=gr.themes.Soft()) as demo:
|
|
75 |
|
76 |
with gr.Tabs():
|
77 |
## Tab 1 — Chart
|
|
|
78 |
with gr.TabItem("🗓️ 주기 차트"):
|
79 |
start_year = gr.Number(label="범위 시작(Year)", value=1500)
|
80 |
end_year = gr.Number(label="범위 끝(Year)", value=2500)
|
81 |
-
|
|
|
|
|
82 |
|
83 |
def update_chart(s, e):
|
84 |
return plot_cycles(int(s), int(e))
|
85 |
|
86 |
start_year.change(update_chart, [start_year, end_year], plot_out)
|
87 |
end_year.change(update_chart, [start_year, end_year], plot_out)
|
88 |
-
plot_out.render()
|
|
|
|
|
|
|
89 |
|
90 |
## Tab 2 — GPT Chat
|
91 |
with gr.TabItem("💬 GPT 채팅"):
|
|
|
75 |
|
76 |
with gr.Tabs():
|
77 |
## Tab 1 — Chart
|
78 |
+
# --- Tab 1 — Chart -------------------------------------------
|
79 |
with gr.TabItem("🗓️ 주기 차트"):
|
80 |
start_year = gr.Number(label="범위 시작(Year)", value=1500)
|
81 |
end_year = gr.Number(label="범위 끝(Year)", value=2500)
|
82 |
+
|
83 |
+
# 처음부터 기본 차트를 보여주도록 value 지정
|
84 |
+
plot_out = gr.Plot(value=plot_cycles(1500, 2500))
|
85 |
|
86 |
def update_chart(s, e):
|
87 |
return plot_cycles(int(s), int(e))
|
88 |
|
89 |
start_year.change(update_chart, [start_year, end_year], plot_out)
|
90 |
end_year.change(update_chart, [start_year, end_year], plot_out)
|
91 |
+
# ❌ plot_out.render() ← 삭제
|
92 |
+
|
93 |
+
|
94 |
+
|
95 |
|
96 |
## Tab 2 — GPT Chat
|
97 |
with gr.TabItem("💬 GPT 채팅"):
|