Update utils.py
Browse filesLoad on cpu explicitly
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 |
|