from utils.history import load_history import gradio as gr def render(): gr.Markdown("## ⚙️ Model Performance & Simulation History") with gr.Row(): with gr.Column(scale=2): gr.Markdown("### 🧩 Recent Simulations") history_table = gr.DataFrame( value=load_history(limit=15), label="Recent Simulation Runs", interactive=False ) refresh_btn = gr.Button("🔄 Refresh Table") def reload_table(): print("🔁 Reloading simulation history...") return load_history(limit=15) refresh_btn.click(fn=reload_table, outputs=history_table)