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)
| 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], |