Antoine245 commited on
Commit
66b97fa
·
1 Parent(s): 5572819

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -35,11 +35,11 @@ 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
- history[-1][1] = " "
39
  bot_message = palm.chat(
40
  context=context,
41
  examples=examples,
42
- messages=history
43
  )
44
  history[-1][1] = ""
45
  for character in bot_message:
 
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.slice(0, -2)
43
  )
44
  history[-1][1] = ""
45
  for character in bot_message: