Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -16,7 +16,7 @@ model_id = "philipp-zettl/chessPT"
|
|
16 |
model_path = hf_hub_download(repo_id=model_id, filename="chessPT.pkl")
|
17 |
|
18 |
model = DecoderTransformer(vocab_size, n_embed, context_size, n_layer, n_head, dropout)
|
19 |
-
model.load_state_dict(torch.load(model_path))
|
20 |
|
21 |
|
22 |
def greet(prompt):
|
|
|
16 |
model_path = hf_hub_download(repo_id=model_id, filename="chessPT.pkl")
|
17 |
|
18 |
model = DecoderTransformer(vocab_size, n_embed, context_size, n_layer, n_head, dropout)
|
19 |
+
model.load_state_dict(torch.load(model_path, map_location=torch.device('cpu')))
|
20 |
|
21 |
|
22 |
def greet(prompt):
|