Spaces:
Runtime error
Runtime error
Commit
•
06264f9
1
Parent(s):
43e2030
Update app.py
Browse files
app.py
CHANGED
@@ -10,25 +10,13 @@ if torch.cuda.is_available():
|
|
10 |
else:
|
11 |
pipe_vq = DiffusionPipeline.from_pretrained("microsoft/vq-diffusion-ithq")
|
12 |
|
13 |
-
examples = [
|
14 |
-
["An astronaut riding a horse."],
|
15 |
-
["A teddy bear playing in the water."],
|
16 |
-
["A simple wedding cake with lego bride and groom topper and cake pops."],
|
17 |
-
["A realistic tree using a mixture of different colored pencils."],
|
18 |
-
["Muscular Santa Claus."],
|
19 |
-
["A man with a pineapple head."],
|
20 |
-
["Pebble tower standing on the left on the sea beach."],
|
21 |
-
]
|
22 |
-
|
23 |
title = "VQ Diffusion vs. Stable Diffusion 1-5"
|
24 |
description = "[VQ-Diffusion-ITHQ](https://huggingface.co/microsoft/vq-diffusion-ithq) for text to image generation."
|
25 |
|
26 |
-
|
27 |
def inference(text):
|
28 |
output_vq_diffusion = pipe_vq(text, truncation_rate=0.86).images[0]
|
29 |
return output_vq_diffusion
|
30 |
|
31 |
-
|
32 |
io = gr.Interface(
|
33 |
inference,
|
34 |
gr.Textbox(lines=3),
|
@@ -36,7 +24,6 @@ io = gr.Interface(
|
|
36 |
gr.Image(type="pil", label="VQ-Diffusion"),
|
37 |
],
|
38 |
title=title,
|
39 |
-
description=description
|
40 |
-
examples=examples
|
41 |
)
|
42 |
io.launch()
|
|
|
10 |
else:
|
11 |
pipe_vq = DiffusionPipeline.from_pretrained("microsoft/vq-diffusion-ithq")
|
12 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
13 |
title = "VQ Diffusion vs. Stable Diffusion 1-5"
|
14 |
description = "[VQ-Diffusion-ITHQ](https://huggingface.co/microsoft/vq-diffusion-ithq) for text to image generation."
|
15 |
|
|
|
16 |
def inference(text):
|
17 |
output_vq_diffusion = pipe_vq(text, truncation_rate=0.86).images[0]
|
18 |
return output_vq_diffusion
|
19 |
|
|
|
20 |
io = gr.Interface(
|
21 |
inference,
|
22 |
gr.Textbox(lines=3),
|
|
|
24 |
gr.Image(type="pil", label="VQ-Diffusion"),
|
25 |
],
|
26 |
title=title,
|
27 |
+
description=description
|
|
|
28 |
)
|
29 |
io.launch()
|