Loading pre-trained models in flask

Solution for Loading pre-trained models in flask
is Given Below:

I have a project that is use nn.Module. After I have train the model that I make, I saved model using the code

torch.save(model_basic_cnn.state_dict(), 'CNN.pth')
weights_fname="CNN.pth"

My question is how to load the model that I save before in the flask.

NB: For flask, I use VS Code, and for the training model use google colab