SanskarModi commited on
Commit
b27e3c8
·
verified ·
1 Parent(s): 9e0f3c3

Update prediction.py

Browse files
Files changed (1) hide show
  1. prediction.py +1 -1
prediction.py CHANGED
@@ -15,7 +15,7 @@ class Prediction:
15
  Initialize the Prediction class with a pre-trained model and necessary parameters.
16
  """
17
  self.device = torch.device("cpu")
18
- self.model = torch.jit.load("model.pt")
19
 
20
  self.model.eval()
21
  params = read_yaml(PARAMS_FILE_PATH)
 
15
  Initialize the Prediction class with a pre-trained model and necessary parameters.
16
  """
17
  self.device = torch.device("cpu")
18
+ self.model = torch.jit.load("model.pt", map_location=self.device)
19
 
20
  self.model.eval()
21
  params = read_yaml(PARAMS_FILE_PATH)