Leyo commited on
Commit
b627bb5
1 Parent(s): f86cfeb

fix regenerate

Browse files
Files changed (1) hide show
  1. app_dialogue.py +8 -0
app_dialogue.py CHANGED
@@ -925,6 +925,10 @@ with gr.Blocks(title="AI Meme Generator", theme=gr.themes.Base(), css=css) as de
925
  inputs=chatbot,
926
  outputs=[chatbot, textbox, generated_memes_gallery],
927
  queue=False,
 
 
 
 
928
  ).then(
929
  fn=model_inference,
930
  inputs=[
@@ -947,6 +951,10 @@ with gr.Blocks(title="AI Meme Generator", theme=gr.themes.Base(), css=css) as de
947
  generated_memes_gallery,
948
  chatbot,
949
  ],
 
 
 
 
950
  )
951
 
952
  gallery_type_choice.change(
 
925
  inputs=chatbot,
926
  outputs=[chatbot, textbox, generated_memes_gallery],
927
  queue=False,
928
+ ).then(
929
+ fn=lambda: regenerate_btn.update(interactive=False),
930
+ inputs=[],
931
+ outputs=[],
932
  ).then(
933
  fn=model_inference,
934
  inputs=[
 
951
  generated_memes_gallery,
952
  chatbot,
953
  ],
954
+ ).then(
955
+ fn=lambda: regenerate_btn.update(interactive=True),
956
+ inputs=[],
957
+ outputs=[],
958
  )
959
 
960
  gallery_type_choice.change(