MCPcopy
hub / github.com/XingangPan/DragGAN / on_click_stop

Function on_click_stop

visualizer_drag_gradio.py:672–679  ·  view source on GitHub ↗

Function to handle stop button is clicked. 1. send a stop signal by set global_state["temporal_params"]["stop"] as True 2. Disable Stop button

(global_state)

Source from the content-addressed store, hash-verified

670 )
671
672 def on_click_stop(global_state):
673 """Function to handle stop button is clicked.
674 1. send a stop signal by set global_state["temporal_params"]["stop"] as True
675 2. Disable Stop button
676 """
677 global_state["temporal_params"]["stop"] = True
678
679 return global_state, gr.Button.update(interactive=False)
680
681 form_stop_btn.click(on_click_stop,
682 inputs=[global_state],

Callers

nothing calls this directly

Calls 1

updateMethod · 0.45

Tested by

no test coverage detected