Spaces:
Running
Running
DiegoTheExplorar
commited on
Update app.py
Browse files
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
|