Axolotlily commited on
Commit
5a2144b
1 Parent(s): 97643e3

Upload app.py

Browse files
Files changed (1) hide show
  1. app.py +13 -0
app.py ADDED
@@ -0,0 +1,13 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import gradio as gr
2
+ from diffusers import DiffusionPipeline
3
+
4
+ ldm = DiffusionPipeline.from_pretrained("CompVis/ldm-text2im-large-256")
5
+
6
+ def inference(prompt):
7
+ images = ldm([prompt],
8
+ num_inference_steps=10,
9
+ eta=0.3,
10
+ guidance_scale=6)["sample"]
11
+ return images
12
+
13
+ gr.Interface(inference, "text", gr.Gallery()).launch()