ChenyangSi commited on
Commit
07f35f8
1 Parent(s): fbf93ca

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -22,7 +22,7 @@ model_id = "CompVis/stable-diffusion-v1-4"
22
  pip = StableDiffusionPipeline.from_pretrained(model_id, torch_dtype=torch.float16)
23
  pip = pip.to("cuda")
24
 
25
- def infer(prompt, model, seed, b1, b2, s1, s2):
26
 
27
  # pip = StableDiffusionPipeline.from_pretrained(model, torch_dtype=torch.float16)
28
  # pip = pip.to("cuda")
@@ -184,11 +184,11 @@ with block:
184
  image_2_label = gr.Markdown("FreeU")
185
 
186
 
187
- ex = gr.Examples(examples=examples, fn=infer, inputs=[text, model, seed, b1, b2, s1, s2], outputs=[image_1, image_2], cache_examples=False)
188
  ex.dataset.headers = [""]
189
 
190
- text.submit(infer, inputs=[text, model, seed, b1, b2, s1, s2], outputs=[image_1, image_2])
191
- btn.click(infer, inputs=[text, model, seed, b1, b2, s1, s2], outputs=[image_1, image_2])
192
 
193
  block.launch()
194
  # block.queue(default_enabled=False).launch(share=False)
 
22
  pip = StableDiffusionPipeline.from_pretrained(model_id, torch_dtype=torch.float16)
23
  pip = pip.to("cuda")
24
 
25
+ def infer(prompt, seed, b1, b2, s1, s2):
26
 
27
  # pip = StableDiffusionPipeline.from_pretrained(model, torch_dtype=torch.float16)
28
  # pip = pip.to("cuda")
 
184
  image_2_label = gr.Markdown("FreeU")
185
 
186
 
187
+ ex = gr.Examples(examples=examples, fn=infer, inputs=[text, seed, b1, b2, s1, s2], outputs=[image_1, image_2], cache_examples=False)
188
  ex.dataset.headers = [""]
189
 
190
+ text.submit(infer, inputs=[text, seed, b1, b2, s1, s2], outputs=[image_1, image_2])
191
+ btn.click(infer, inputs=[text, seed, b1, b2, s1, s2], outputs=[image_1, image_2])
192
 
193
  block.launch()
194
  # block.queue(default_enabled=False).launch(share=False)