profaker commited on
Commit
7ac4e01
1 Parent(s): 44c8d3f

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -3
app.py CHANGED
@@ -85,7 +85,7 @@ def predict(dict, prompt="", negative_prompt="", guidance_scale=7.5, steps=30, s
85
  print("Strength:", strength)
86
  print("Scheduler:", scheduler)
87
 
88
- return inpainted_image, gr.update(visible=True)
89
 
90
 
91
  css = '''
@@ -150,14 +150,15 @@ with image_blocks as demo:
150
 
151
  with gr.Column():
152
  image_out = gr.Image(label="Output", elem_id="output-img", height=512, width=512)
 
153
  with gr.Group(elem_id="share-btn-container", visible=False) as share_btn_container:
154
  community_icon = gr.HTML(community_icon_html)
155
  loading_icon = gr.HTML(loading_icon_html)
156
  share_button = gr.Button("Share to community", elem_id="share-btn",visible=True)
157
 
158
 
159
- btn.click(fn=predict, inputs=[image, prompt, negative_prompt, guidance_scale, steps, strength, model, scheduler], outputs=[image_out,share_btn_container], api_name='run')
160
- prompt.submit(fn=predict, inputs=[image, prompt, negative_prompt, guidance_scale, steps, strength, model, scheduler], outputs=[image_out,share_btn_container])
161
  share_button.click(None, [], [], _js=share_js)
162
 
163
 
 
85
  print("Strength:", strength)
86
  print("Scheduler:", scheduler)
87
 
88
+ return inpainted_image, combined_image, gr.update(visible=True)
89
 
90
 
91
  css = '''
 
150
 
151
  with gr.Column():
152
  image_out = gr.Image(label="Output", elem_id="output-img", height=512, width=512)
153
+ image_out1 = gr.Image(label="Output", elem_id="output-img", height=512, width=512)
154
  with gr.Group(elem_id="share-btn-container", visible=False) as share_btn_container:
155
  community_icon = gr.HTML(community_icon_html)
156
  loading_icon = gr.HTML(loading_icon_html)
157
  share_button = gr.Button("Share to community", elem_id="share-btn",visible=True)
158
 
159
 
160
+ btn.click(fn=predict, inputs=[image, prompt, negative_prompt, guidance_scale, steps, strength, model, scheduler], outputs=[image_out,image_out1,share_btn_container], api_name='run')
161
+ prompt.submit(fn=predict, inputs=[image, prompt, negative_prompt, guidance_scale, steps, strength, model, scheduler], outputs=[image_out,image_out1,share_btn_container])
162
  share_button.click(None, [], [], _js=share_js)
163
 
164