Spaces:
Paused
Paused
Update app.py
Browse files
app.py
CHANGED
@@ -71,39 +71,43 @@ with gr.Blocks(css="app/style.css") as demo:
|
|
71 |
# result = gr.Gallery(label='Result')
|
72 |
result = gr.Image(label="Result", type="pil", height=512, width=512)
|
73 |
|
74 |
-
|
75 |
-
|
76 |
-
|
77 |
-
|
78 |
-
|
79 |
-
|
80 |
-
|
81 |
-
|
82 |
-
|
83 |
-
|
84 |
-
|
85 |
-
|
86 |
-
|
87 |
-
|
88 |
-
|
89 |
-
|
90 |
-
|
91 |
-
|
92 |
-
|
93 |
-
|
94 |
-
|
95 |
-
|
96 |
-
|
97 |
-
|
98 |
-
|
99 |
-
|
100 |
-
|
101 |
-
|
102 |
-
|
103 |
-
|
104 |
-
|
105 |
-
|
106 |
-
|
|
|
|
|
|
|
|
|
107 |
|
108 |
inputs = [
|
109 |
input_image,
|
|
|
71 |
# result = gr.Gallery(label='Result')
|
72 |
result = gr.Image(label="Result", type="pil", height=512, width=512)
|
73 |
|
74 |
+
examples = [
|
75 |
+
[
|
76 |
+
"examples_demo/1.jpeg", # input_image
|
77 |
+
"a dreamy cat sleeping on a floating leaf", # src_prompt
|
78 |
+
"a dreamy bear sleeping on a floating leaf", # tgt_prompt
|
79 |
+
7, # seed
|
80 |
+
1.3, # w1
|
81 |
+
],
|
82 |
+
[
|
83 |
+
"examples_demo/2.jpeg", # input_image
|
84 |
+
"A painting of a cat and a bunny surrounded by flowers", # src_prompt
|
85 |
+
"a polygonal illustration of a cat and a bunny", # tgt_prompt
|
86 |
+
2, # seed
|
87 |
+
1.5, # w1
|
88 |
+
],
|
89 |
+
[
|
90 |
+
"examples_demo/3.jpg", # input_image
|
91 |
+
"a chess pawn wearing a crown", # src_prompt
|
92 |
+
"a chess pawn wearing a hat", # tgt_prompt
|
93 |
+
2, # seed
|
94 |
+
1.3, # w1
|
95 |
+
],
|
96 |
+
]
|
97 |
+
|
98 |
+
gr.Examples(
|
99 |
+
examples=examples,
|
100 |
+
inputs=[
|
101 |
+
input_image,
|
102 |
+
src_prompt,
|
103 |
+
tgt_prompt,
|
104 |
+
seed,
|
105 |
+
w1,
|
106 |
+
],
|
107 |
+
outputs=[result],
|
108 |
+
fn=main_pipeline,
|
109 |
+
cache_examples=True,
|
110 |
+
)
|
111 |
|
112 |
inputs = [
|
113 |
input_image,
|