Update app.py
Browse files
app.py
CHANGED
@@ -19,7 +19,7 @@ encode = lambda s: [stoi[c] for c in s]
|
|
19 |
decode = lambda l: ''.join([itos[i] for i in l])
|
20 |
|
21 |
model = GPTLanguageModel(vocab_size)
|
22 |
-
model.load_state_dict(torch.load('
|
23 |
m = model.to(cfg.device)
|
24 |
|
25 |
def inference(input_text, count):
|
|
|
19 |
decode = lambda l: ''.join([itos[i] for i in l])
|
20 |
|
21 |
model = GPTLanguageModel(vocab_size)
|
22 |
+
model.load_state_dict(torch.load('model.pth', map_location=cfg.device))
|
23 |
m = model.to(cfg.device)
|
24 |
|
25 |
def inference(input_text, count):
|