hymai commited on
Commit
1b28850
·
verified ·
1 Parent(s): 1ecb64b

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -203,7 +203,7 @@ with gr.Blocks() as demo:
203
  async def bot(history):
204
  user_message = history[-1][0]
205
  #bot_message = chat_engine.chat(user_message)
206
- bot_message = asyncio.run(query_engine.aquery(user_message + "Let's think step by step to get the correct answer. If you cannot provide an answer, say you don't know."))
207
  history[-1][1] = ""
208
  for character in bot_message.response:
209
  history[-1][1] += character
@@ -211,7 +211,7 @@ with gr.Blocks() as demo:
211
  yield history
212
 
213
  msg.submit(user, [msg, chatbot], [msg, chatbot], queue=False).then(
214
- await bot, chatbot, chatbot
215
  )
216
  clear.click(lambda: None, None, chatbot, queue=False)
217
  # demo.queue()
 
203
  async def bot(history):
204
  user_message = history[-1][0]
205
  #bot_message = chat_engine.chat(user_message)
206
+ bot_message = await query_engine.aquery(user_message + "Let's think step by step to get the correct answer. If you cannot provide an answer, say you don't know.")
207
  history[-1][1] = ""
208
  for character in bot_message.response:
209
  history[-1][1] += character
 
211
  yield history
212
 
213
  msg.submit(user, [msg, chatbot], [msg, chatbot], queue=False).then(
214
+ bot, chatbot, chatbot
215
  )
216
  clear.click(lambda: None, None, chatbot, queue=False)
217
  # demo.queue()