Mps does not work jupyter notebook

hello,i am using macbook pro m1 and i want to use pytorch mps on jupiter notebook.although i have written jupiter notebook and pytorch properly,it works on cpu,it doesn’t switch to gpu.i have installed all necessary versions.mps is installed as shown in screen shots but it still works on cpu.why can this happen?
Also I use Yolov8

As you can see the gpu says 0 and it doesn’t work.
I also tried to change the kernel but it still doesn’t work.please help.
ın jupyter notebook python version is= Python 3.10.13