Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -13,7 +13,7 @@ from transformers import (
|
|
13 |
)
|
14 |
from diffusers import VQModel
|
15 |
import gradio as gr
|
16 |
-
import spaces
|
17 |
|
18 |
device = 'cuda' if torch.cuda.is_available() else 'cpu'
|
19 |
dtype = torch.bfloat16
|
@@ -32,7 +32,7 @@ pipe.to(device)
|
|
32 |
|
33 |
MAX_SEED = 2**32 - 1
|
34 |
|
35 |
-
|
36 |
def generate_image(occasion, theme, colors, randomize_seed=True, seed=0):
|
37 |
prompt = f"{occasion} theme: {theme}, colors: {colors} design inspiration"
|
38 |
if randomize_seed or seed == 0:
|
|
|
13 |
)
|
14 |
from diffusers import VQModel
|
15 |
import gradio as gr
|
16 |
+
#import spaces
|
17 |
|
18 |
device = 'cuda' if torch.cuda.is_available() else 'cpu'
|
19 |
dtype = torch.bfloat16
|
|
|
32 |
|
33 |
MAX_SEED = 2**32 - 1
|
34 |
|
35 |
+
#@spaces.GPU
|
36 |
def generate_image(occasion, theme, colors, randomize_seed=True, seed=0):
|
37 |
prompt = f"{occasion} theme: {theme}, colors: {colors} design inspiration"
|
38 |
if randomize_seed or seed == 0:
|