DiegoTheExplorar commited on
Commit
fe18d0f
·
verified ·
1 Parent(s): 3d607e7

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -28,7 +28,7 @@ decoder = Decoder(output_dim, emb_dim, hid_dim, n_layers, dropout).to(device)
28
  model = Seq2SeqModel(encoder, decoder, device).to(device)
29
 
30
  # Load the saved model
31
- model.load_state_dict(torch.load('English_to_Klingon.pth'))
32
  model.eval() # Set the model to evaluation mode
33
 
34
  #tokenize the English input
 
28
  model = Seq2SeqModel(encoder, decoder, device).to(device)
29
 
30
  # Load the saved model
31
+ model.load_state_dict(torch.load('English_to_Klingon.pth', map_location=torch.device('cpu')))
32
  model.eval() # Set the model to evaluation mode
33
 
34
  #tokenize the English input