Commit
•
d7d24e9
1
Parent(s):
44850e7
Move to ZeroGPU (#7)
Browse files- Move to ZeroGPU (dd67371c6b2b2772ed818f425236db12ec7e51f8)
Co-authored-by: Charles Bensimon <cbensimon@users.noreply.huggingface.co>
app.py
CHANGED
@@ -7,6 +7,7 @@ import uuid
|
|
7 |
import gradio as gr
|
8 |
import numpy as np
|
9 |
from PIL import Image
|
|
|
10 |
import torch
|
11 |
from diffusers import DiffusionPipeline
|
12 |
|
@@ -55,6 +56,7 @@ def randomize_seed_fn(seed: int, randomize_seed: bool) -> int:
|
|
55 |
return seed
|
56 |
|
57 |
|
|
|
58 |
def generate(
|
59 |
prompt: str,
|
60 |
negative_prompt: str = "",
|
|
|
7 |
import gradio as gr
|
8 |
import numpy as np
|
9 |
from PIL import Image
|
10 |
+
import spaces
|
11 |
import torch
|
12 |
from diffusers import DiffusionPipeline
|
13 |
|
|
|
56 |
return seed
|
57 |
|
58 |
|
59 |
+
@spaces.GPU
|
60 |
def generate(
|
61 |
prompt: str,
|
62 |
negative_prompt: str = "",
|