Delete parapickle.py
Browse files- parapickle.py +0 -10
parapickle.py
DELETED
@@ -1,10 +0,0 @@
|
|
1 |
-
from transformers import AutoTokenizer, AutoModelForSeq2SeqLM
|
2 |
-
import torch
|
3 |
-
import pickle
|
4 |
-
|
5 |
-
model = AutoModelForSeq2SeqLM.from_pretrained("ramsrigouthamg/t5-large-paraphraser-diverse-high-quality")
|
6 |
-
tokenizer = AutoTokenizer.from_pretrained("ramsrigouthamg/t5-large-paraphraser-diverse-high-quality")
|
7 |
-
pickle.dump(model, open('model.pkl', 'wb'))
|
8 |
-
pickle.dump(model, open('tokenizer.pkl', 'wb'))
|
9 |
-
device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
|
10 |
-
model = model.to(device)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|