Spaces:
Runtime error
Runtime error
Upload folder using huggingface_hub
Browse files
app.py
CHANGED
@@ -7,7 +7,7 @@ import torch
|
|
7 |
|
8 |
def generate_nanogpt_text():
|
9 |
model = BigramLanguageModel(vocab_size=65, n_embed=n_embed, block_size=BLOCK_SIZE, num_heads=n_head, n_layers=n_layer)
|
10 |
-
ckpt = torch.load(os.path.join("./nano_gpt_ckpts", "ckpt_5k_iters.pt"))
|
11 |
model.load_state_dict(ckpt['model'])
|
12 |
|
13 |
char_tokenizer = load_int_char_tokenizer(load_text())
|
|
|
7 |
|
8 |
def generate_nanogpt_text():
|
9 |
model = BigramLanguageModel(vocab_size=65, n_embed=n_embed, block_size=BLOCK_SIZE, num_heads=n_head, n_layers=n_layer)
|
10 |
+
ckpt = torch.load(os.path.join("./nano_gpt_ckpts", "ckpt_5k_iters.pt"), map_location=torch.device('cpu'))
|
11 |
model.load_state_dict(ckpt['model'])
|
12 |
|
13 |
char_tokenizer = load_int_char_tokenizer(load_text())
|