HemanM commited on
Commit
6a4410c
·
verified ·
1 Parent(s): ef5a88b

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +9 -4
app.py CHANGED
@@ -120,13 +120,11 @@ with gr.Blocks(title="EvoTransformer v2.1 – Compare Options and Learn") as dem
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
 
@@ -136,5 +134,12 @@ with gr.Blocks(title="EvoTransformer v2.1 – Compare Options and Learn") as dem
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)
 
120
  outputs=[feedback_output]
121
  )
122
 
123
+ # === Retrain section with auto-refresh + spinner
124
  with gr.Row():
125
+ retrain_button = gr.Button("♻️ Retrain Evo", variant="primary")
126
  retrain_status = gr.Textbox(label="Retrain Status")
127
 
 
 
 
128
  with gr.Accordion("🧬 EvoTransformer Architecture", open=False):
129
  arch_box = gr.Textbox(label="Model Configuration", value=get_architecture_summary(model), lines=5, interactive=False)
130
 
 
134
  with gr.Accordion("📊 User Feedback Summary", open=False):
135
  dashboard_img = gr.Image(value=update_dashboard_plot(), label="Solution Votes")
136
 
137
+ retrain_button.click(
138
+ fn=retrain_model,
139
+ inputs=[],
140
+ outputs=[arch_box, evo_plot, retrain_status],
141
+ show_progress=True
142
+ )
143
+
144
  if __name__ == "__main__":
145
  demo.launch(share=True)