Yaron Koresh commited on
Commit
1fe0d57
·
verified ·
1 Parent(s): a9dd5f4

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -1
app.py CHANGED
@@ -184,7 +184,10 @@ def main():
184
  result.append(gr.Image(interactive=False,elem_classes="image-container", label="Result", show_label=False, type='filepath', show_share_button=False))
185
  result.append(gr.Image(interactive=False,elem_classes="image-container", label="Result", show_label=False, type='filepath', show_share_button=False))
186
 
187
- run_button.click(fn=run,inputs=[prompt,*result],outputs=result)
 
 
 
188
  demo.queue().launch()
189
 
190
  if __name__ == "__main__":
 
184
  result.append(gr.Image(interactive=False,elem_classes="image-container", label="Result", show_label=False, type='filepath', show_share_button=False))
185
  result.append(gr.Image(interactive=False,elem_classes="image-container", label="Result", show_label=False, type='filepath', show_share_button=False))
186
 
187
+ gr.on(
188
+ triggers=[run_button.click, prompt.submit],
189
+ fn=run,inputs=[prompt,*result],outputs=result
190
+ )
191
  demo.queue().launch()
192
 
193
  if __name__ == "__main__":