Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -7,7 +7,7 @@ import torch
|
|
7 |
tokenizer = AutoTokenizer.from_pretrained("merve/chatgpt-prompt-generator-v12")
|
8 |
model = AutoModelForSeq2SeqLM.from_pretrained("merve/chatgpt-prompt-generator-v12", from_tf=True)
|
9 |
|
10 |
-
device = "cuda
|
11 |
model.to(device)
|
12 |
|
13 |
@spaces.GPU
|
|
|
7 |
tokenizer = AutoTokenizer.from_pretrained("merve/chatgpt-prompt-generator-v12")
|
8 |
model = AutoModelForSeq2SeqLM.from_pretrained("merve/chatgpt-prompt-generator-v12", from_tf=True)
|
9 |
|
10 |
+
device = "cuda" if torch.cuda.is_available() else "cpu"
|
11 |
model.to(device)
|
12 |
|
13 |
@spaces.GPU
|