Wauplin HF staff commited on
Commit
70cd9d2
1 Parent(s): d673a82

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -1
app.py CHANGED
@@ -12,6 +12,7 @@ from diffusers import (
12
  EulerDiscreteScheduler # <-- Added import
13
  )
14
  from share_btn import community_icon_html, loading_icon_html, share_js
 
15
  from illusion_style import css
16
 
17
  BASE_MODEL = "SG161222/Realistic_Vision_V5.1_noVAE"
@@ -125,11 +126,15 @@ with gr.Blocks(css=css) as app:
125
  community_icon = gr.HTML(community_icon_html)
126
  loading_icon = gr.HTML(loading_icon_html)
127
  share_button = gr.Button("Share to community", elem_id="share-btn")
128
-
 
 
129
  run_btn.click(
130
  inference,
131
  inputs=[control_image, prompt, negative_prompt, guidance_scale, controlnet_conditioning_scale, seed, sampler],
132
  outputs=[result_image, share_group]
 
 
133
  )
134
  share_button.click(None, [], [], _js=share_js)
135
  app.queue(max_size=20)
 
12
  EulerDiscreteScheduler # <-- Added import
13
  )
14
  from share_btn import community_icon_html, loading_icon_html, share_js
15
+ from gallery_history import fetch_gallery_history, show_gallery_history
16
  from illusion_style import css
17
 
18
  BASE_MODEL = "SG161222/Realistic_Vision_V5.1_noVAE"
 
126
  community_icon = gr.HTML(community_icon_html)
127
  loading_icon = gr.HTML(loading_icon_html)
128
  share_button = gr.Button("Share to community", elem_id="share-btn")
129
+
130
+ history = show_gallery_history()
131
+
132
  run_btn.click(
133
  inference,
134
  inputs=[control_image, prompt, negative_prompt, guidance_scale, controlnet_conditioning_scale, seed, sampler],
135
  outputs=[result_image, share_group]
136
+ ).then(
137
+ fn=fetch_gallery_history, inputs=[prompt, result_image], outputs=history
138
  )
139
  share_button.click(None, [], [], _js=share_js)
140
  app.queue(max_size=20)