Spaces:
Sleeping
Sleeping
Update main.py
Browse files
main.py
CHANGED
|
@@ -63,7 +63,7 @@ class KhmerSpellLSTM(nn.Module):
|
|
| 63 |
# =====================================================
|
| 64 |
device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
|
| 65 |
|
| 66 |
-
checkpoint = torch.load("
|
| 67 |
|
| 68 |
char_to_idx = checkpoint["char_to_idx"]
|
| 69 |
vocab = checkpoint.get("vocab", char_to_idx.keys())
|
|
|
|
| 63 |
# =====================================================
|
| 64 |
device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
|
| 65 |
|
| 66 |
+
checkpoint = torch.load("khmer_spell_lstm.pth", map_location=device)
|
| 67 |
|
| 68 |
char_to_idx = checkpoint["char_to_idx"]
|
| 69 |
vocab = checkpoint.get("vocab", char_to_idx.keys())
|