Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
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,
|
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 |
|