tonyassi commited on
Commit
f92e412
β€’
1 Parent(s): be495a2

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +9 -2
app.py CHANGED
@@ -18,7 +18,7 @@ def blend(img1, img2, slider):
18
  images_texts = [img1, img2]
19
 
20
  # specify the weights for each condition in images_texts
21
- weights = [slider, 1-slider]
22
 
23
  prior_out = pipe_prior.interpolate(images_texts, weights)
24
 
@@ -40,7 +40,14 @@ with gr.Blocks() as demo:
40
  btn = gr.Button("Blend")
41
  with gr.Column():
42
  output = gr.Image(label='Result')
43
-
 
 
 
 
 
 
 
44
 
45
  btn.click(fn=blend, inputs=[img1, img2, slider], outputs=output)
46
 
 
18
  images_texts = [img1, img2]
19
 
20
  # specify the weights for each condition in images_texts
21
+ weights = [1-slider, slider]
22
 
23
  prior_out = pipe_prior.interpolate(images_texts, weights)
24
 
 
40
  btn = gr.Button("Blend")
41
  with gr.Column():
42
  output = gr.Image(label='Result')
43
+
44
+ gr.Examples(
45
+ [['./cat.png', './starry_night.jpg', 0.5]],
46
+ [img1, img2, slider],
47
+ output,
48
+ blend,
49
+ cache_examples=True,
50
+ )
51
 
52
  btn.click(fn=blend, inputs=[img1, img2, slider], outputs=output)
53