Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -11,13 +11,13 @@ from PIL import Image, ImageOps
|
|
11 |
from torchvision import transforms
|
12 |
|
13 |
|
14 |
-
|
15 |
from diffusers import DiffusionPipeline
|
16 |
|
17 |
pipe = DiffusionPipeline.from_pretrained(...)
|
18 |
pipe.to('cuda')
|
19 |
|
20 |
-
|
21 |
def generate(prompt):
|
22 |
return pipe(prompt).images
|
23 |
|
@@ -29,7 +29,7 @@ gr.Interface(
|
|
29 |
|
30 |
@spaces.GPU(duration=120)
|
31 |
def generate(prompt):
|
32 |
-
return pipe(prompt).images
|
33 |
|
34 |
# ----------------- HELPER FUNCTIONS ----------------- #
|
35 |
os.chdir(os.path.dirname(os.path.abspath(__file__)))
|
|
|
11 |
from torchvision import transforms
|
12 |
|
13 |
|
14 |
+
'''import spaces
|
15 |
from diffusers import DiffusionPipeline
|
16 |
|
17 |
pipe = DiffusionPipeline.from_pretrained(...)
|
18 |
pipe.to('cuda')
|
19 |
|
20 |
+
@spaces.GPU
|
21 |
def generate(prompt):
|
22 |
return pipe(prompt).images
|
23 |
|
|
|
29 |
|
30 |
@spaces.GPU(duration=120)
|
31 |
def generate(prompt):
|
32 |
+
return pipe(prompt).images'''
|
33 |
|
34 |
# ----------------- HELPER FUNCTIONS ----------------- #
|
35 |
os.chdir(os.path.dirname(os.path.abspath(__file__)))
|