malcolmSQ commited on
Commit ·
801d73b
1
Parent(s): e0a99b2
Fix: ensure all plots and tables display full 30-year duration (remove .head(30) truncation)
Browse files- dashboard/app.py +3 -3
dashboard/app.py
CHANGED
|
@@ -76,7 +76,7 @@ def run_model_from_config(config):
|
|
| 76 |
for col in species_results_fmt.columns:
|
| 77 |
if species_results_fmt[col].dtype in [float, int]:
|
| 78 |
species_results_fmt[col] = species_results_fmt[col].apply(lambda x: f"{x:,.2f}" if isinstance(x, float) else f"{x:,}")
|
| 79 |
-
return (*plots, summary, results_fmt
|
| 80 |
|
| 81 |
def run_model(config_path):
|
| 82 |
with open(config_path) as f:
|
|
@@ -95,7 +95,7 @@ def run_model(config_path):
|
|
| 95 |
for col in species_results_fmt.columns:
|
| 96 |
if species_results_fmt[col].dtype in [float, int]:
|
| 97 |
species_results_fmt[col] = species_results_fmt[col].apply(lambda x: f"{x:,.2f}" if isinstance(x, float) else f"{x:,}")
|
| 98 |
-
return (*plots, summary, results_fmt
|
| 99 |
|
| 100 |
def check_complex(arr, label):
|
| 101 |
if np.iscomplexobj(arr):
|
|
@@ -311,7 +311,7 @@ with gr.Blocks() as demo:
|
|
| 311 |
for col in species_results_fmt.columns:
|
| 312 |
if species_results_fmt[col].dtype in [float, int]:
|
| 313 |
species_results_fmt[col] = species_results_fmt[col].apply(lambda x: f"{x:,.2f}" if isinstance(x, float) else f"{x:,}")
|
| 314 |
-
return plots[0], plots[2], plots[1], summary, results_fmt
|
| 315 |
|
| 316 |
update_btn.click(
|
| 317 |
update_declining_increment,
|
|
|
|
| 76 |
for col in species_results_fmt.columns:
|
| 77 |
if species_results_fmt[col].dtype in [float, int]:
|
| 78 |
species_results_fmt[col] = species_results_fmt[col].apply(lambda x: f"{x:,.2f}" if isinstance(x, float) else f"{x:,}")
|
| 79 |
+
return (*plots, summary, results_fmt, species_results_fmt, survival_table)
|
| 80 |
|
| 81 |
def run_model(config_path):
|
| 82 |
with open(config_path) as f:
|
|
|
|
| 95 |
for col in species_results_fmt.columns:
|
| 96 |
if species_results_fmt[col].dtype in [float, int]:
|
| 97 |
species_results_fmt[col] = species_results_fmt[col].apply(lambda x: f"{x:,.2f}" if isinstance(x, float) else f"{x:,}")
|
| 98 |
+
return (*plots, summary, results_fmt, species_results_fmt, survival_table)
|
| 99 |
|
| 100 |
def check_complex(arr, label):
|
| 101 |
if np.iscomplexobj(arr):
|
|
|
|
| 311 |
for col in species_results_fmt.columns:
|
| 312 |
if species_results_fmt[col].dtype in [float, int]:
|
| 313 |
species_results_fmt[col] = species_results_fmt[col].apply(lambda x: f"{x:,.2f}" if isinstance(x, float) else f"{x:,}")
|
| 314 |
+
return plots[0], plots[2], plots[1], summary, results_fmt, species_results_fmt, survival_table
|
| 315 |
|
| 316 |
update_btn.click(
|
| 317 |
update_declining_increment,
|