rajora commited on
Commit
340fe1a
1 Parent(s): 5713811

gpu to cpu 2

Browse files
utils/__pycache__/model.cpython-310.pyc CHANGED
Binary files a/utils/__pycache__/model.cpython-310.pyc and b/utils/__pycache__/model.cpython-310.pyc differ
 
utils/model.py CHANGED
@@ -20,6 +20,6 @@ def load_model():
20
  device = torch.device("cpu")
21
  net = EffNet(n_classes=2).to(device)
22
  model_path = os.path.join(os.path.dirname(__file__), 'models', 'modelo_galaxias.pth')
23
- net.load_state_dict(torch.load(model_path)) # Adjust path if needed
24
  net.eval()
25
  return net
 
20
  device = torch.device("cpu")
21
  net = EffNet(n_classes=2).to(device)
22
  model_path = os.path.join(os.path.dirname(__file__), 'models', 'modelo_galaxias.pth')
23
+ net.load_state_dict(torch.load(model_path, map_location=torch.device('cpu'))) # Adjust path if needed
24
  net.eval()
25
  return net