Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -12,6 +12,11 @@ if torch.cuda.is_available():
|
|
12 |
else:
|
13 |
device = "cpu"
|
14 |
print("Using CPU")
|
|
|
|
|
|
|
|
|
|
|
15 |
|
16 |
|
17 |
def generate(
|
|
|
12 |
else:
|
13 |
device = "cpu"
|
14 |
print("Using CPU")
|
15 |
+
|
16 |
+
|
17 |
+
model = T5ForConditionalGeneration.from_pretrained("roborovski/superprompt-v1", torch_dtype=torch.float16)
|
18 |
+
|
19 |
+
model.to(device)
|
20 |
|
21 |
|
22 |
def generate(
|