vipee003 commited on
Commit
433a2c0
·
verified ·
1 Parent(s): 0f7af09

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -4,8 +4,8 @@ model_id = "CompVis/ldm-text2im-large-256"
4
  ldm = DiffusionPipeline.from_pretrained(model_id)
5
 
6
  def generate_image(Prompt):
7
- images = ldm([Prompt], num_inference_steps=50, eta=.3, guidance_scale=6)
8
- return images.images[0]
9
 
10
  interface = gr.Interface(fn = generate_image,inputs = "text",outputs = "image",title = "Mashdemy Demo Image Generator App", description = "Type in a text and click submit to generate an image:", examples = ["a clown reading a book", "a cat using a laptop", "An elephant on grass"])
11
  interface.launch(share = True)
 
4
  ldm = DiffusionPipeline.from_pretrained(model_id)
5
 
6
  def generate_image(Prompt):
7
+ images = ldm([Prompt], num_inference_steps=50, eta=.3, guidance_scale=6)
8
+ return images.images[0]
9
 
10
  interface = gr.Interface(fn = generate_image,inputs = "text",outputs = "image",title = "Mashdemy Demo Image Generator App", description = "Type in a text and click submit to generate an image:", examples = ["a clown reading a book", "a cat using a laptop", "An elephant on grass"])
11
  interface.launch(share = True)