HemanM commited on
Commit
cb31db0
·
verified ·
1 Parent(s): 3a2ee1d

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +8 -6
app.py CHANGED
@@ -12,7 +12,7 @@ import gradio as gr
12
  import random
13
  from inference import generate_response
14
  from logger import log_user_feedback
15
- from dashboard import update_dashboard_plot
16
  from watchdog import retrain_model
17
  from init_model import load_model
18
 
@@ -120,19 +120,21 @@ with gr.Blocks(title="EvoTransformer v2.1 – Compare Options and Learn") as dem
120
  outputs=[feedback_output]
121
  )
122
 
123
- with gr.Row():
124
- gr.Markdown("### 📊 Dashboard")
125
- dashboard_plot = gr.Plot()
126
- dashboard_plot = update_dashboard_plot()
127
-
128
  with gr.Row():
129
  retrain_button = gr.Button("♻️ Retrain Evo")
130
  retrain_status = gr.Textbox(label="Retrain Status")
131
 
132
  retrain_button.click(fn=retrain_model, inputs=[], outputs=[retrain_status])
133
 
 
134
  with gr.Accordion("🧬 EvoTransformer Architecture", open=False):
135
  arch_box = gr.Textbox(label="Model Configuration", value=get_architecture_summary(model), lines=5, interactive=False)
136
 
 
 
 
 
 
 
137
  if __name__ == "__main__":
138
  demo.launch(share=True)
 
12
  import random
13
  from inference import generate_response
14
  from logger import log_user_feedback
15
+ from dashboard import update_dashboard_plot, evolution_accuracy_plot
16
  from watchdog import retrain_model
17
  from init_model import load_model
18
 
 
120
  outputs=[feedback_output]
121
  )
122
 
 
 
 
 
 
123
  with gr.Row():
124
  retrain_button = gr.Button("♻️ Retrain Evo")
125
  retrain_status = gr.Textbox(label="Retrain Status")
126
 
127
  retrain_button.click(fn=retrain_model, inputs=[], outputs=[retrain_status])
128
 
129
+ # === Accordion Visual Panels ===
130
  with gr.Accordion("🧬 EvoTransformer Architecture", open=False):
131
  arch_box = gr.Textbox(label="Model Configuration", value=get_architecture_summary(model), lines=5, interactive=False)
132
 
133
+ with gr.Accordion("📈 Evolution Accuracy Plot", open=False):
134
+ evo_plot = gr.Plot(label="Accuracy per Generation", value=evolution_accuracy_plot())
135
+
136
+ with gr.Accordion("📊 User Feedback Summary", open=False):
137
+ dashboard_img = gr.Image(value=update_dashboard_plot(), label="Solution Votes")
138
+
139
  if __name__ == "__main__":
140
  demo.launch(share=True)