Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -1,3 +1,19 @@
|
|
1 |
-
import
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2 |
|
3 |
-
gr.load("models/ovieyra21/yebama-sd15").launch()
|
|
|
1 |
+
import spaces
|
2 |
+
from diffusers import DiffusionPipeline
|
3 |
+
|
4 |
+
pipe = DiffusionPipeline.from_pretrained("stable-diffusion-v1-5/stable-diffusion-v1-5")
|
5 |
+
pipe.load_lora_weights("ovieyra21/yebama-sd15")
|
6 |
+
pipe.to('cuda')
|
7 |
+
|
8 |
+
@spaces.GPU
|
9 |
+
prompt = "yebama"
|
10 |
+
image = pipe(prompt).images[0]
|
11 |
+
def generate(prompt):
|
12 |
+
return pipe(prompt).images
|
13 |
+
|
14 |
+
gr.Interface(
|
15 |
+
fn=generate,
|
16 |
+
inputs=gr.Text(),
|
17 |
+
outputs=gr.Gallery(),
|
18 |
+
).launch()
|
19 |
|
|