basilboy commited on
Commit
3f03685
·
verified ·
1 Parent(s): f106271

Update utils.py

Browse files

Load on cpu explicitly

Files changed (1) hide show
  1. utils.py +1 -1
utils.py CHANGED
@@ -6,7 +6,7 @@ def validate_sequence(sequence):
6
 
7
  def load_model():
8
  # Assuming the model is a simple PyTorch model, adjust the path as needed
9
- model = torch.load('model.pth')
10
  model.eval()
11
  return model
12
 
 
6
 
7
  def load_model():
8
  # Assuming the model is a simple PyTorch model, adjust the path as needed
9
+ model = torch.load('model.pth', map_location=torch.device('cpu'))
10
  model.eval()
11
  return model
12