Spaces:
Running
Running
open side bar after generation complete
Browse files
app.py
CHANGED
|
@@ -8199,8 +8199,8 @@ with gr.Blocks(
|
|
| 8199 |
return [gr.update(open=False), gr.update(visible=False)]
|
| 8200 |
|
| 8201 |
def end_generation_ui():
|
| 8202 |
-
#
|
| 8203 |
-
return [gr.update(), gr.update(visible=False)]
|
| 8204 |
|
| 8205 |
btn.click(
|
| 8206 |
begin_generation_ui,
|
|
@@ -8252,6 +8252,23 @@ with gr.Blocks(
|
|
| 8252 |
end_generation_ui,
|
| 8253 |
inputs=None,
|
| 8254 |
outputs=[sidebar, generating_status]
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 8255 |
).then(
|
| 8256 |
show_deploy_components,
|
| 8257 |
None,
|
|
|
|
| 8199 |
return [gr.update(open=False), gr.update(visible=False)]
|
| 8200 |
|
| 8201 |
def end_generation_ui():
|
| 8202 |
+
# Open sidebar after generation; hide the status
|
| 8203 |
+
return [gr.update(open=True), gr.update(visible=False)]
|
| 8204 |
|
| 8205 |
btn.click(
|
| 8206 |
begin_generation_ui,
|
|
|
|
| 8252 |
end_generation_ui,
|
| 8253 |
inputs=None,
|
| 8254 |
outputs=[sidebar, generating_status]
|
| 8255 |
+
).then(
|
| 8256 |
+
# After generation, toggle editors for transformers.js and populate
|
| 8257 |
+
toggle_editors,
|
| 8258 |
+
inputs=[language_dropdown, code_output],
|
| 8259 |
+
outputs=[code_output, tjs_group, tjs_html_code, tjs_js_code, tjs_css_code]
|
| 8260 |
+
).then(
|
| 8261 |
+
# After generation, toggle static multi-file editors for HTML
|
| 8262 |
+
toggle_static_editors,
|
| 8263 |
+
inputs=[language_dropdown, code_output],
|
| 8264 |
+
outputs=[
|
| 8265 |
+
code_output,
|
| 8266 |
+
static_group_2, static_group_3, static_group_4, static_group_5plus,
|
| 8267 |
+
static_tab_2_1, static_code_2_1, static_tab_2_2, static_code_2_2,
|
| 8268 |
+
static_tab_3_1, static_code_3_1, static_tab_3_2, static_code_3_2, static_tab_3_3, static_code_3_3,
|
| 8269 |
+
static_tab_4_1, static_code_4_1, static_tab_4_2, static_code_4_2, static_tab_4_3, static_code_4_3, static_tab_4_4, static_code_4_4,
|
| 8270 |
+
static_tab_5_1, static_code_5_1, static_tab_5_2, static_code_5_2, static_tab_5_3, static_code_5_3, static_tab_5_4, static_code_5_4, static_tab_5_5, static_code_5_5,
|
| 8271 |
+
]
|
| 8272 |
).then(
|
| 8273 |
show_deploy_components,
|
| 8274 |
None,
|