xu song commited on
Commit
411027b
1 Parent(s): 3ac04fa
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -82,9 +82,9 @@ with gr.Blocks() as demo:
82
 
83
  generate_btn.click(generate, [chatbot, history], outputs=[generated_text, chatbot, history],
84
  show_progress="full")
85
- retry_btn.click(undo_generate, [chatbot, history], outputs=[generated_text, chatbot, history])
86
- retry_btn.click(generate, [chatbot, history], outputs=[generated_text, chatbot, history],
87
- show_progress="full")
88
  undo_btn.click(undo_generate, [chatbot, history], outputs=[generated_text, chatbot, history])
89
 
90
  slider_max_tokens.change(set_max_tokens, inputs=[slider_max_tokens])
 
82
 
83
  generate_btn.click(generate, [chatbot, history], outputs=[generated_text, chatbot, history],
84
  show_progress="full")
85
+ retry_btn.click(undo_generate, [chatbot, history], outputs=[generated_text, chatbot, history]) \
86
+ .then(generate, [chatbot, history], outputs=[generated_text, chatbot, history],
87
+ show_progress="full")
88
  undo_btn.click(undo_generate, [chatbot, history], outputs=[generated_text, chatbot, history])
89
 
90
  slider_max_tokens.change(set_max_tokens, inputs=[slider_max_tokens])