phillipinseoul commited on
Commit
4ecf6e4
1 Parent(s): 984b34e

add example outputs

Browse files
Files changed (1) hide show
  1. app.py +16 -8
app.py CHANGED
@@ -78,16 +78,24 @@ if __name__=="__main__":
78
  ['a photo of a lake under the northern lights', 2048, 20.0, 5, 6]
79
  ],
80
  inputs=[prompt, width, sync_weight, sync_thres, seed],
81
- outputs=[
82
- [gr.Gallery(join("./assets", "result_castle_seed_1.png"))],
83
- [gr.Gallery(join("./assets", "result_natural_seed_2.png"))],
84
- [gr.Gallery(join("./assets", "result_northern_seed_6.png"))],
85
- # [gr.Gallery(value=join("assets", "result_castle_seed_1.png"), label='Output', show_label=False, elem_id="gallery").style(grid=2, height='auto')],
86
- # [gr.Gallery(value=join("assets", "result_natural_seed_2.png"), label='Output', show_label=False, elem_id="gallery").style(grid=2, height='auto')],
87
- # [gr.Gallery(value=join("assets", "result_northern_seed_6.png"), label='Output', show_label=False, elem_id="gallery").style(grid=2, height='auto')],
88
- ]
89
  )
90
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
91
  ips = [prompt, width, sync_weight, sync_thres, seed]
92
  run_button.click(fn=run_inference, inputs=ips, outputs=[result_gallery])
93
 
 
78
  ['a photo of a lake under the northern lights', 2048, 20.0, 5, 6]
79
  ],
80
  inputs=[prompt, width, sync_weight, sync_thres, seed],
 
 
 
 
 
 
 
 
81
  )
82
 
83
+ # display example images
84
+ with gr.Row():
85
+ gr.Image(Image.open(join("assets", "result_castle_seed_1.png")), label="Sample output 1")
86
+ with gr.Row():
87
+ gr.Textbox(label="Prompt", type="text", value="a cinematic view of a castle in the sunset")
88
+
89
+ with gr.Row():
90
+ gr.Image(Image.open(join("assets", "result_landscape_seed_2.png")), label="Sample output 2")
91
+ with gr.Row():
92
+ gr.Textbox(label="Prompt", type="text", value="natural landscape in anime style illustration")
93
+
94
+ with gr.Row():
95
+ gr.Image(Image.open(join("assets", "result_northern_lights_seed_6.png")), label="Sample output 3")
96
+ with gr.Row():
97
+ gr.Textbox(label="Prompt", type="text", value="a photo of a lake under the northern lights")
98
+
99
  ips = [prompt, width, sync_weight, sync_thres, seed]
100
  run_button.click(fn=run_inference, inputs=ips, outputs=[result_gallery])
101