Spaces:
Runtime error
Runtime error
Commit
·
a9f4cd1
1
Parent(s):
e275702
Update app.py
Browse files
app.py
CHANGED
@@ -32,10 +32,10 @@ with gr.Blocks() as demo:
|
|
32 |
clear = gr.ClearButton([msg, chatbot])
|
33 |
|
34 |
def user(user_message, history):
|
35 |
-
return gr.update(value="", interactive=False), history + [[user_message,
|
36 |
def bot(history):
|
37 |
# chat_history.append(message) # Initialize chat history
|
38 |
-
|
39 |
bot_message = palm.chat(
|
40 |
context=context,
|
41 |
examples=examples,
|
|
|
32 |
clear = gr.ClearButton([msg, chatbot])
|
33 |
|
34 |
def user(user_message, history):
|
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,
|