mylesai commited on
Commit
40724c2
·
verified ·
1 Parent(s): 14e12cf

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -961,7 +961,7 @@ with gr.Blocks() as block:
961
  def user(user_message, history):
962
  return "", [[user_message, None]]
963
 
964
- def bot(history):
965
  user_message = history[-1][0]
966
  bot_message = chatbot_response(user_message, history, chat_engine[-1])
967
  history[-1][1] = ""
@@ -990,7 +990,7 @@ with gr.Blocks() as block:
990
 
991
  # selection.select(fn=get_collection_names, outputs=[selection])
992
  msg.submit(user, [msg, chatbot], [msg, chatbot], queue=False).then(
993
- bot, chatbot, chatbot)
994
  clear.click(lambda: None, None, chatbot, queue=False)
995
  algo_event = algorithm.click(fn=import_client_data, inputs=[selection, zipfile, topical_map, password, project_bool, ai_bool], outputs=[upload, err_imgs])
996
  bf_event = bf_button.click(fn=bf_trigger.run_preprocess_ai, inputs=[bf_topical_map, bf_selection, section], outputs=[bf_upload])
 
961
  def user(user_message, history):
962
  return "", [[user_message, None]]
963
 
964
+ def bot(history, chat_engine):
965
  user_message = history[-1][0]
966
  bot_message = chatbot_response(user_message, history, chat_engine[-1])
967
  history[-1][1] = ""
 
990
 
991
  # selection.select(fn=get_collection_names, outputs=[selection])
992
  msg.submit(user, [msg, chatbot], [msg, chatbot], queue=False).then(
993
+ bot, [chatbot, chat_engine], [chatbot, chat_engine])
994
  clear.click(lambda: None, None, chatbot, queue=False)
995
  algo_event = algorithm.click(fn=import_client_data, inputs=[selection, zipfile, topical_map, password, project_bool, ai_bool], outputs=[upload, err_imgs])
996
  bf_event = bf_button.click(fn=bf_trigger.run_preprocess_ai, inputs=[bf_topical_map, bf_selection, section], outputs=[bf_upload])