Spaces:
Running
Running
Fix hub ui
Browse files
ui.py
CHANGED
|
@@ -283,7 +283,6 @@ def build_interface() -> gr.Blocks:
|
|
| 283 |
# --- Event Wiring ---
|
| 284 |
|
| 285 |
# 1. Initialization
|
| 286 |
-
# Note: init_session now returns updates for both model_name_input and org_dropdown
|
| 287 |
demo.load(lock_ui, outputs=action_buttons + hub_inputs).then(
|
| 288 |
fn=UIController.init_session,
|
| 289 |
inputs=None, # Gradio automatically injects profile and token
|
|
@@ -321,13 +320,13 @@ def build_interface() -> gr.Blocks:
|
|
| 321 |
|
| 322 |
# 3a. Training
|
| 323 |
train_run_event = run_btn.click(
|
| 324 |
-
fn=lambda:
|
| 325 |
-
gr.update(visible=False),
|
| 326 |
-
gr.update(interactive=False),
|
| 327 |
-
gr.update(interactive=False)
|
| 328 |
-
|
| 329 |
-
gr.update(visible=True)
|
| 330 |
-
|
| 331 |
outputs=[run_btn, reload_btn, eval_btn, *hub_inputs, stop_btn]
|
| 332 |
)
|
| 333 |
train_run_event = train_run_event.then(
|
|
|
|
| 283 |
# --- Event Wiring ---
|
| 284 |
|
| 285 |
# 1. Initialization
|
|
|
|
| 286 |
demo.load(lock_ui, outputs=action_buttons + hub_inputs).then(
|
| 287 |
fn=UIController.init_session,
|
| 288 |
inputs=None, # Gradio automatically injects profile and token
|
|
|
|
| 320 |
|
| 321 |
# 3a. Training
|
| 322 |
train_run_event = run_btn.click(
|
| 323 |
+
fn=lambda: [
|
| 324 |
+
gr.update(visible=False), # run_btn
|
| 325 |
+
gr.update(interactive=False), # reload_btn
|
| 326 |
+
gr.update(interactive=False) # eval_btn
|
| 327 |
+
] + [gr.update(interactive=False) for _ in hub_inputs] + [ # Unpack Hub Inputs list
|
| 328 |
+
gr.update(visible=True) # stop_btn
|
| 329 |
+
],
|
| 330 |
outputs=[run_btn, reload_btn, eval_btn, *hub_inputs, stop_btn]
|
| 331 |
)
|
| 332 |
train_run_event = train_run_event.then(
|