.
cp = torch.load(os.path.join(script_dir, 'model.pkl'), map_location=torch.device('cpu'))
I think this code is making my website not functioning, but if I
remove map_location=torch.device('cpu')
, there will be an error
RuntimeError: Attempting to deserialize object on a CUDA device but torch.cuda.is_available() is False. If you are running on a CPU-only machine, please use torch.load with map_location=torch.device('cpu') to map your storages to the CPU.
Is there anyway I can solve this? Please help!!