rwayz commited on
Commit
6741f25
·
verified ·
1 Parent(s): 30df920

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -80,7 +80,8 @@ with gr.Blocks(theme=gr.themes.Soft()) as demo:
80
  def respond(message, chat_history, model_name):
81
  response = chatbot_response(message, model_name)
82
  response = clean_response(response)
83
- chat_history.append((message, response))
 
84
  return "", chat_history
85
 
86
  btn.click(respond, [msg, chatbot, model_selector], [msg, chatbot])
 
80
  def respond(message, chat_history, model_name):
81
  response = chatbot_response(message, model_name)
82
  response = clean_response(response)
83
+ chat_history.append({"role": "user", "content": message})
84
+ chat_history.append({"role": "assistant", "content": response})
85
  return "", chat_history
86
 
87
  btn.click(respond, [msg, chatbot, model_selector], [msg, chatbot])