Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -23,7 +23,7 @@ class TextPredictor(nn.Module):
|
|
| 23 |
return self.fc2(x)
|
| 24 |
|
| 25 |
# ====== LOAD SAVED MODEL ======
|
| 26 |
-
checkpoint = torch.load("text_predictor_model.pth", map_location=device)
|
| 27 |
vocab = checkpoint['vocab']
|
| 28 |
word2idx = checkpoint['word2idx']
|
| 29 |
idx2word = checkpoint['idx2word']
|
|
|
|
| 23 |
return self.fc2(x)
|
| 24 |
|
| 25 |
# ====== LOAD SAVED MODEL ======
|
| 26 |
+
checkpoint = torch.load("text_predictor_model.pth", map_location=device, weights_only=False)
|
| 27 |
vocab = checkpoint['vocab']
|
| 28 |
word2idx = checkpoint['word2idx']
|
| 29 |
idx2word = checkpoint['idx2word']
|