If you want to restart the kernel (not just stop the current cell), you can use:
python
from IPython.display import display, HTML
display(HTML("<script>Jupyter.notebook.kernel.restart()</script>"))
This will restart the kernel, stopping all execution.
Note: Methods 1 and 2 are more direct and will stop the notebook immediately, while methods 3 and 4 are more interactive and may require the notebook to be in a specific state. Use the method that best fits your needs!
Feb 3, 11:43pm
This is a shared conversation and may include unverified content that doesn't reflect Mistral AI's views. Login to resume chatting.