Spaces:
Running
Running
Update app.py
Browse files
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(
|
|
|
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])
|