Spaces:
Runtime error
Runtime error
akshaytrikha
commited on
Commit
•
e7a9f5e
1
Parent(s):
71eba68
Update app.py
Browse files
app.py
CHANGED
@@ -5,7 +5,7 @@ import torch
|
|
5 |
device = 'cuda' if torch.cuda.is_available() else 'cpu'
|
6 |
|
7 |
# load pretrained + finetuned GPT2
|
8 |
-
model = GPT2LMHeadModel.from_pretrained("./model
|
9 |
# model = GPT2LMHeadModel.from_pretrained("/zxc/model_epoch40_50w")
|
10 |
model = model.to(device)
|
11 |
|
|
|
5 |
device = 'cuda' if torch.cuda.is_available() else 'cpu'
|
6 |
|
7 |
# load pretrained + finetuned GPT2
|
8 |
+
model = GPT2LMHeadModel.from_pretrained("./model", from_pt=True)
|
9 |
# model = GPT2LMHeadModel.from_pretrained("/zxc/model_epoch40_50w")
|
10 |
model = model.to(device)
|
11 |
|