minor fixes
Browse files
app.py
CHANGED
@@ -394,6 +394,7 @@ with gr.Blocks(title="Swift Stock Screener, by Reddgr") as front:
|
|
394 |
|
395 |
def on_company_tab():
|
396 |
global selected_ticker
|
|
|
397 |
# if evt.selected and selected_ticker:
|
398 |
if selected_ticker:
|
399 |
maestro_details = maestro[company_details_cols].copy()
|
@@ -422,9 +423,14 @@ with gr.Blocks(title="Swift Stock Screener, by Reddgr") as front:
|
|
422 |
)
|
423 |
# No company selected – leave widgets as‑is
|
424 |
return gr.update(), gr.update(), gr.update(), gr.update() # summary_display
|
|
|
|
|
|
|
|
|
425 |
|
426 |
company_tab.select(
|
427 |
-
|
|
|
428 |
inputs=[],
|
429 |
outputs=[company_title, company_summary, company_details, company_plot]
|
430 |
)
|
@@ -475,9 +481,9 @@ with gr.Blocks(title="Swift Stock Screener, by Reddgr") as front:
|
|
475 |
# details_df.to_pickle(ROOT / "pkl" / "details_df_test.pkl")
|
476 |
print(f"DEBUG ➡ selected ticker={ticker}, name={name}")
|
477 |
return (
|
478 |
-
last_result_df,
|
479 |
-
pagination_label,
|
480 |
-
page_state,
|
481 |
#summary_display,
|
482 |
gr.update(),
|
483 |
gr.update(selected=1),
|
|
|
394 |
|
395 |
def on_company_tab():
|
396 |
global selected_ticker
|
397 |
+
print(f"DEBUG on_company_tab: selected_ticker={selected_ticker}")
|
398 |
# if evt.selected and selected_ticker:
|
399 |
if selected_ticker:
|
400 |
maestro_details = maestro[company_details_cols].copy()
|
|
|
423 |
)
|
424 |
# No company selected – leave widgets as‑is
|
425 |
return gr.update(), gr.update(), gr.update(), gr.update() # summary_display
|
426 |
+
|
427 |
+
def _dbg_company_tab_select(*_):
|
428 |
+
print("DEBUG company_tab.select event fired")
|
429 |
+
return on_company_tab()
|
430 |
|
431 |
company_tab.select(
|
432 |
+
_dbg_company_tab_select,
|
433 |
+
# on_company_tab,
|
434 |
inputs=[],
|
435 |
outputs=[company_title, company_summary, company_details, company_plot]
|
436 |
)
|
|
|
481 |
# details_df.to_pickle(ROOT / "pkl" / "details_df_test.pkl")
|
482 |
print(f"DEBUG ➡ selected ticker={ticker}, name={name}")
|
483 |
return (
|
484 |
+
gr.update(), # last_result_df,
|
485 |
+
gr.update(), # pagination_label,
|
486 |
+
gr.update(), # page_state,
|
487 |
#summary_display,
|
488 |
gr.update(),
|
489 |
gr.update(selected=1),
|