Antoine245 commited on
Commit
8360277
·
1 Parent(s): 7314f64

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -33,12 +33,12 @@ with gr.Blocks() as demo:
33
 
34
  def respond(message,chat_history):
35
  chat_history.append(message) # Initialize chat history
36
- user_input.append([chat_history[0]])
37
 
38
  bot_message = palm.chat(
39
  **defaults,
40
  context=context,
41
- messages=user_input
42
  )
43
  time.sleep(2)
44
  return "", chat_history
 
33
 
34
  def respond(message,chat_history):
35
  chat_history.append(message) # Initialize chat history
36
+ messages = [palm.discuss._make_message(message) for message in chat_history]
37
 
38
  bot_message = palm.chat(
39
  **defaults,
40
  context=context,
41
+ messages=messages
42
  )
43
  time.sleep(2)
44
  return "", chat_history