Spaces:
Runtime error
Runtime error
Commit
·
ed16e15
1
Parent(s):
fa70179
empty cache
Browse files
app.py
CHANGED
@@ -6,6 +6,8 @@ import torch
|
|
6 |
from transformers import pipeline, GPT2Tokenizer, OPTForCausalLM
|
7 |
device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
|
8 |
|
|
|
|
|
9 |
model=OPTForCausalLM.from_pretrained("pushkarraj/opt_paraphraser")
|
10 |
tokenizer=GPT2Tokenizer.from_pretrained("facebook/opt-1.3b",truncation=True)
|
11 |
|
|
|
6 |
from transformers import pipeline, GPT2Tokenizer, OPTForCausalLM
|
7 |
device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
|
8 |
|
9 |
+
torch.cuda.empty_cache()
|
10 |
+
|
11 |
model=OPTForCausalLM.from_pretrained("pushkarraj/opt_paraphraser")
|
12 |
tokenizer=GPT2Tokenizer.from_pretrained("facebook/opt-1.3b",truncation=True)
|
13 |
|