Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -120,19 +120,14 @@ with gr.Blocks(title="EvoTransformer v2.1 β Compare Options and Learn") as dem
|
|
120 |
outputs=[feedback_output]
|
121 |
)
|
122 |
|
123 |
-
# ===
|
|
|
|
|
|
|
|
|
|
|
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 |
-
|
131 |
-
with gr.Accordion("π Evolution Accuracy Plot", open=False):
|
132 |
-
evo_plot = gr.Plot(label="Accuracy per Generation", value=evolution_accuracy_plot())
|
133 |
-
|
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,
|
@@ -141,5 +136,18 @@ with gr.Blocks(title="EvoTransformer v2.1 β Compare Options and Learn") as dem
|
|
141 |
show_progress=True
|
142 |
)
|
143 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
144 |
if __name__ == "__main__":
|
145 |
demo.launch(share=True)
|
|
|
120 |
outputs=[feedback_output]
|
121 |
)
|
122 |
|
123 |
+
# === Define UI components to allow later refresh ===
|
124 |
+
retrain_status = gr.Textbox(label="Retrain Status")
|
125 |
+
arch_box = gr.Textbox(label="Model Configuration", value=get_architecture_summary(model), lines=5, interactive=False)
|
126 |
+
evo_plot = gr.Plot(label="Accuracy per Generation", value=evolution_accuracy_plot())
|
127 |
+
dashboard_img = gr.Image(value=update_dashboard_plot(), label="Solution Votes")
|
128 |
+
|
129 |
with gr.Row():
|
130 |
retrain_button = gr.Button("β»οΈ Retrain Evo", variant="primary")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
131 |
|
132 |
retrain_button.click(
|
133 |
fn=retrain_model,
|
|
|
136 |
show_progress=True
|
137 |
)
|
138 |
|
139 |
+
# === Render inside Accordions ===
|
140 |
+
with gr.Accordion("𧬠EvoTransformer Architecture", open=False):
|
141 |
+
arch_box.render()
|
142 |
+
|
143 |
+
with gr.Accordion("π Evolution Accuracy Plot", open=False):
|
144 |
+
evo_plot.render()
|
145 |
+
|
146 |
+
with gr.Accordion("π User Feedback Summary", open=False):
|
147 |
+
dashboard_img.render()
|
148 |
+
|
149 |
+
with gr.Accordion("π Retrain Status", open=False):
|
150 |
+
retrain_status.render()
|
151 |
+
|
152 |
if __name__ == "__main__":
|
153 |
demo.launch(share=True)
|