Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -11,7 +11,7 @@ from abc import abstractmethod
|
|
11 |
import torch.backends
|
12 |
import torch.mps
|
13 |
from PIL import Image
|
14 |
-
|
15 |
|
16 |
if torch.cuda.is_available():
|
17 |
device = torch.device("cuda")
|
@@ -185,7 +185,7 @@ def describe_shape(shape):
|
|
185 |
return f"Shape: {shape} num elements: {np.prod(shape)}"
|
186 |
|
187 |
|
188 |
-
|
189 |
@torch.no_grad()
|
190 |
def roundtrip_image(
|
191 |
image,
|
|
|
11 |
import torch.backends
|
12 |
import torch.mps
|
13 |
from PIL import Image
|
14 |
+
import spaces
|
15 |
|
16 |
if torch.cuda.is_available():
|
17 |
device = torch.device("cuda")
|
|
|
185 |
return f"Shape: {shape} num elements: {np.prod(shape)}"
|
186 |
|
187 |
|
188 |
+
@spaces.GPU(duration=32)
|
189 |
@torch.no_grad()
|
190 |
def roundtrip_image(
|
191 |
image,
|