TharunSiva commited on
Commit
e20d7c3
·
1 Parent(s): 7d906de

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -4,7 +4,7 @@ from model import *
4
  device = "cuda" if torch.cuda.is_available() else "cpu"
5
 
6
  model = GPTLanguageModel().to(device)
7
- model.load_state_dict(torch.load("mini-gpt.pth"))
8
 
9
  answer = decode(model.generate(context, max_new_tokens=1000)[0].tolist())
10
 
 
4
  device = "cuda" if torch.cuda.is_available() else "cpu"
5
 
6
  model = GPTLanguageModel().to(device)
7
+ model.load_state_dict(torch.load("mini-gpt.pth",map_location=DEVICE), strict=False)
8
 
9
  answer = decode(model.generate(context, max_new_tokens=1000)[0].tolist())
10