MaxMilan1
commited on
Commit
·
12863e1
1
Parent(s):
32f5fd9
stupid max
Browse files
app.py
CHANGED
@@ -1,4 +1,4 @@
|
|
1 |
-
|
2 |
import gradio as gr
|
3 |
import torch
|
4 |
from diffusers import DiffusionPipeline
|
@@ -9,7 +9,7 @@ pipe = DiffusionPipeline.from_pretrained(model_id)
|
|
9 |
pipe.to("cuda")
|
10 |
|
11 |
# Function to generate an image from text using diffusion
|
12 |
-
|
13 |
def generate_image(prompt):
|
14 |
|
15 |
images = pipe(prompt=prompt, negative_prompt=neg_prompt,)
|
|
|
1 |
+
import spaces
|
2 |
import gradio as gr
|
3 |
import torch
|
4 |
from diffusers import DiffusionPipeline
|
|
|
9 |
pipe.to("cuda")
|
10 |
|
11 |
# Function to generate an image from text using diffusion
|
12 |
+
@spaces.GPU
|
13 |
def generate_image(prompt):
|
14 |
|
15 |
images = pipe(prompt=prompt, negative_prompt=neg_prompt,)
|