GPU not working on jupyter notebook

I am having problem to run gpu on jupyter notebook.

I run on jupyter notebook:
import torch

giving False

but on terminal it is giving True.

Any help?

Run the following commands in both terminal and jupyter notebook and paste the output here.

import sys



I solved the issue. The problem was with Ubuntu system update. I just restarted