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