QAway-to commited on
Commit
978bdd6
·
1 Parent(s): b9435d1

New tabs and functions v4.5

Browse files
Files changed (1) hide show
  1. app.py +7 -2
app.py CHANGED
@@ -97,8 +97,13 @@ with gr.Blocks(css=base_css) as demo:
97
 
98
  # обновляем графики при смене пары
99
  pair_selector.change(fn=update_visuals, inputs=pair_selector, outputs=[price_plot, vol_plot])
100
- # первичная инициализация при запуске
101
- demo.load(fn=update_visuals, inputs=None, outputs=[price_plot, vol_plot], _js="() => 'Bitcoin vs Ethereum'")
 
 
 
 
 
102
 
103
  # --- Crypto Intelligence Dashboard (Plotly Edition + KPI line) ---
104
  with gr.TabItem("Crypto Intelligence Dashboard"):
 
97
 
98
  # обновляем графики при смене пары
99
  pair_selector.change(fn=update_visuals, inputs=pair_selector, outputs=[price_plot, vol_plot])
100
+
101
+
102
+ # первичная инициализация при запуске (Gradio 5.x compatible)
103
+ def init_visuals():
104
+ return update_visuals("Bitcoin vs Ethereum")
105
+
106
+ demo.load(fn=init_visuals, inputs=None, outputs=[price_plot, vol_plot])
107
 
108
  # --- Crypto Intelligence Dashboard (Plotly Edition + KPI line) ---
109
  with gr.TabItem("Crypto Intelligence Dashboard"):