Tristan Thrush commited on
Commit
1043275
1 Parent(s): f1da0cf
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -177,7 +177,7 @@ with demo:
177
  chatbot.memory = model_id2model[state["data"][-1]["response2model_id"][selected_response]].memory
178
 
179
  text_input = gr.update(visible=False) if done else gr.update(visible=True)
180
- return gr.update(visible=False), gr.update(visible=True), text_input, gr.update(visible=False), state, gr.update(value=past_conversation_string), toggle_example_submit, toggle_final_submit, toggle_final_submit_preview,
181
 
182
  # Input fields
183
  past_conversation = gr.Markdown()
@@ -201,14 +201,14 @@ with demo:
201
  select_response_button.click(
202
  _select_response,
203
  inputs=[select_response, state, dummy],
204
- outputs=[select_response, example_submit, text_input, select_response_button, state, past_conversation, example_submit, final_submit, final_submit_preview],
205
  _js=get_window_location_search_js,
206
  )
207
 
208
  submit_ex_button.click(
209
  _predict,
210
  inputs=[text_input, state],
211
- outputs=[text_input, select_response_button, select_response, past_conversation, state, example_submit, final_submit, final_submit_preview, state_display, dummy],
212
  _js=get_window_location_search_js,
213
  )
214
 
 
177
  chatbot.memory = model_id2model[state["data"][-1]["response2model_id"][selected_response]].memory
178
 
179
  text_input = gr.update(visible=False) if done else gr.update(visible=True)
180
+ return gr.update(visible=False), gr.update(visible=True), text_input, gr.update(visible=False), state, gr.update(value=past_conversation_string), toggle_example_submit, toggle_final_submit, toggle_final_submit_preview, dummy
181
 
182
  # Input fields
183
  past_conversation = gr.Markdown()
 
201
  select_response_button.click(
202
  _select_response,
203
  inputs=[select_response, state, dummy],
204
+ outputs=[select_response, example_submit, text_input, select_response_button, state, past_conversation, example_submit, final_submit, final_submit_preview, dummy],
205
  _js=get_window_location_search_js,
206
  )
207
 
208
  submit_ex_button.click(
209
  _predict,
210
  inputs=[text_input, state],
211
+ outputs=[text_input, select_response_button, select_response, past_conversation, state, example_submit, final_submit, final_submit_preview, state_display],
212
  _js=get_window_location_search_js,
213
  )
214