turboedit commited on
Commit
d63526a
·
verified ·
1 Parent(s): 33f0c5a

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +37 -33
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
- # examples = [
75
- # [
76
- # "demo_im/WhatsApp Image 2024-05-17 at 17.32.53.jpeg", #input_image
77
- # "a painting of a white cat sleeping on a lotus flower", #src_prompt
78
- # "a painting of a white cat sleeping on a lotus flower", #tgt_prompt
79
- # 4759, #seed
80
- # 1.0, #w1
81
- # # 1.1, #w2
82
- # ],
83
- # [
84
- # "demo_im/pexels-pixabay-458976.less.png", #input_image
85
- # "a squirrel standing in the grass", #src_prompt
86
- # "a squirrel standing in the grass", #tgt_prompt
87
- # 6128, #seed
88
- # 1.25, #w1
89
- # # 1.1, #w2
90
- # ],
91
- # ]
92
-
93
- # gr.Examples(examples=examples,
94
- # inputs=[
95
- # input_image,
96
- # src_prompt,
97
- # tgt_prompt,
98
- # seed,
99
- # w1,
100
- # # w2,
101
- # ],
102
- # outputs=[
103
- # result
104
- # ],
105
- # fn=main_pipeline,
106
- # cache_examples=True)
 
 
 
 
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,