adil22jaleel
commited on
Commit
•
fff458d
1
Parent(s):
fbe59dd
Upload app.py
Browse files
app.py
CHANGED
@@ -158,7 +158,7 @@ with open('input.txt', 'r', encoding='utf-8') as f:
|
|
158 |
|
159 |
# Load the shakespeaere model
|
160 |
shakespeare_model = BigramLanguageModel(shakespeare_text, n_embd).to(device) # Initialize an instance of your model
|
161 |
-
shakespeare_model.load_state_dict(torch.load('
|
162 |
shakespeare_model.eval() # Set the model to evaluation mode
|
163 |
|
164 |
|
|
|
158 |
|
159 |
# Load the shakespeaere model
|
160 |
shakespeare_model = BigramLanguageModel(shakespeare_text, n_embd).to(device) # Initialize an instance of your model
|
161 |
+
shakespeare_model.load_state_dict(torch.load('nano-gpt.pth', map_location=torch.device('cpu')))
|
162 |
shakespeare_model.eval() # Set the model to evaluation mode
|
163 |
|
164 |
|