fb700 commited on
Commit
263c0e7
1 Parent(s): 70ed470

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -261,7 +261,7 @@ with gr.Blocks(title="🐰Bofan Ai🐰", theme=gr.themes.Soft(text_size="sm")) a
261
  history,
262
  past_key_values,
263
  ],
264
- [chatbot, history, past_key_values, test1],
265
  show_progress="full",
266
  )
267
  submitBtn.click(
@@ -276,14 +276,14 @@ with gr.Blocks(title="🐰Bofan Ai🐰", theme=gr.themes.Soft(text_size="sm")) a
276
  history,
277
  past_key_values,
278
  ],
279
- [chatbot, history, past_key_values, test1],
280
  show_progress="full",
281
  api_name="predict",
282
  )
283
  submitBtn.click(reset_user_input, [], [user_input])
284
 
285
  emptyBtn.click(
286
- reset_state, outputs=[chatbot, history, past_key_values, test1], show_progress="full"
287
  )
288
 
289
  retryBtn.click(
@@ -298,7 +298,7 @@ with gr.Blocks(title="🐰Bofan Ai🐰", theme=gr.themes.Soft(text_size="sm")) a
298
  past_key_values,
299
  ],
300
  # outputs = [chatbot, history, last_user_message, user_message]
301
- outputs=[chatbot, history, past_key_values, test1],
302
  )
303
  deleteBtn.click(delete_last_turn, [chatbot, history], [chatbot, history])
304
 
 
261
  history,
262
  past_key_values,
263
  ],
264
+ [chatbot, history, past_key_values],
265
  show_progress="full",
266
  )
267
  submitBtn.click(
 
276
  history,
277
  past_key_values,
278
  ],
279
+ [chatbot, history, past_key_values],
280
  show_progress="full",
281
  api_name="predict",
282
  )
283
  submitBtn.click(reset_user_input, [], [user_input])
284
 
285
  emptyBtn.click(
286
+ reset_state, outputs=[chatbot, history, past_key_values], show_progress="full"
287
  )
288
 
289
  retryBtn.click(
 
298
  past_key_values,
299
  ],
300
  # outputs = [chatbot, history, last_user_message, user_message]
301
+ outputs=[chatbot, history, past_key_values],
302
  )
303
  deleteBtn.click(delete_last_turn, [chatbot, history], [chatbot, history])
304