Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -9,6 +9,7 @@ import torch
|
|
9 |
from PIL import Image, ImageOps
|
10 |
import time
|
11 |
import psutil
|
|
|
12 |
import math
|
13 |
import random
|
14 |
|
@@ -20,7 +21,7 @@ device = "GPU 🔥" if torch.cuda.is_available() else "CPU 🥶"
|
|
20 |
if torch.cuda.is_available():
|
21 |
pipe = pipe.to("cuda")
|
22 |
|
23 |
-
|
24 |
def pix2pix(
|
25 |
input_image: Image.Image,
|
26 |
instruction: str,
|
|
|
9 |
from PIL import Image, ImageOps
|
10 |
import time
|
11 |
import psutil
|
12 |
+
import spaces
|
13 |
import math
|
14 |
import random
|
15 |
|
|
|
21 |
if torch.cuda.is_available():
|
22 |
pipe = pipe.to("cuda")
|
23 |
|
24 |
+
@spaces.GPU(duration=120)
|
25 |
def pix2pix(
|
26 |
input_image: Image.Image,
|
27 |
instruction: str,
|