Antoine245 commited on
Commit
27e43ec
·
1 Parent(s): 022c744

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -35,12 +35,12 @@ with gr.Blocks() as demo:
35
  return gr.update(value="", interactive=False), history + [[user_message,None]]
36
  def bot(history):
37
  # chat_history.append(message) # Initialize chat history
 
38
  bot_message = palm.chat(
39
  context=context,
40
  examples=examples,
41
- messages=history[-1][0]
42
  )
43
- history[-1][1] = ""
44
  for character in bot_message:
45
  history[-1][1] += character
46
  time.sleep(0.05)
 
35
  return gr.update(value="", interactive=False), history + [[user_message,None]]
36
  def bot(history):
37
  # chat_history.append(message) # Initialize chat history
38
+ history[-1][1] = ""
39
  bot_message = palm.chat(
40
  context=context,
41
  examples=examples,
42
+ messages=history
43
  )
 
44
  for character in bot_message:
45
  history[-1][1] += character
46
  time.sleep(0.05)