KvrParaskevi commited on
Commit
2d5d543
·
verified ·
1 Parent(s): 93c9f45

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -5
app.py CHANGED
@@ -11,12 +11,11 @@ with gr.Blocks() as demo:
11
 
12
  def bot(history):
13
  print("Question: ", history[-1][0])
14
- llm_chain.run(question=history[-1][0])
 
15
  history[-1][1] = ""
16
- for character in llm.streamer:
17
- print(character)
18
- history[-1][1] += character
19
- yield history
20
 
21
  msg.submit(user, [msg, chatbot], [msg, chatbot], queue=False).then(bot, chatbot, chatbot)
22
  clear.click(lambda: None, None, chatbot, queue=False)
 
11
 
12
  def bot(history):
13
  print("Question: ", history[-1][0])
14
+ bot_message = llm_chain.run(question=history[-1][0])
15
+ print("Response: ", bot_message)
16
  history[-1][1] = ""
17
+ history[-1][1] += bot_message
18
+ return history
 
 
19
 
20
  msg.submit(user, [msg, chatbot], [msg, chatbot], queue=False).then(bot, chatbot, chatbot)
21
  clear.click(lambda: None, None, chatbot, queue=False)