Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -4,8 +4,8 @@ import torch
|
|
4 |
|
5 |
trained_tokenizer = GPT2Tokenizer.from_pretrained("Kumarkishalaya/GPT-2-next-word-prediction")
|
6 |
trained_model = GPT2LMHeadModel.from_pretrained("Kumarkishalaya/GPT-2-next-word-prediction")
|
7 |
-
|
8 |
-
|
9 |
device = "cuda" if torch.cuda.is_available() else "cpu"
|
10 |
trained_model.to(device)
|
11 |
untrained_model.to(device)
|
|
|
4 |
|
5 |
trained_tokenizer = GPT2Tokenizer.from_pretrained("Kumarkishalaya/GPT-2-next-word-prediction")
|
6 |
trained_model = GPT2LMHeadModel.from_pretrained("Kumarkishalaya/GPT-2-next-word-prediction")
|
7 |
+
untrained_tokenizer = GPT2Tokenizer.from_pretrained("gpt2")
|
8 |
+
untrained_model = GPT2LMHeadModel.from_pretrained("gpt2")
|
9 |
device = "cuda" if torch.cuda.is_available() else "cpu"
|
10 |
trained_model.to(device)
|
11 |
untrained_model.to(device)
|