Spaces:
Sleeping
Sleeping
Commit
·
749f119
1
Parent(s):
3821e91
Updated model name
Browse files
app.py
CHANGED
@@ -6,7 +6,7 @@ cuda = torch.cuda.is_available()
|
|
6 |
device = 'cuda' if cuda else 'cpu'
|
7 |
|
8 |
model = BigramLanguageModel()
|
9 |
-
model.load_state_dict(torch.load("
|
10 |
|
11 |
# read text file
|
12 |
with open('input.txt', 'r', encoding='utf-8') as f:
|
|
|
6 |
device = 'cuda' if cuda else 'cpu'
|
7 |
|
8 |
model = BigramLanguageModel()
|
9 |
+
model.load_state_dict(torch.load("nanogpt.pth", map_location=torch.device(device)), strict=False)
|
10 |
|
11 |
# read text file
|
12 |
with open('input.txt', 'r', encoding='utf-8') as f:
|