Spaces:
Runtime error
Runtime error
Commit
·
ade31c0
1
Parent(s):
31fb46e
Update app.py
Browse files
app.py
CHANGED
@@ -33,12 +33,12 @@ with gr.Blocks() as demo:
|
|
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 |
bot_message = palm.chat(
|
39 |
context=context,
|
40 |
examples=examples,
|
41 |
-
messages=history[1]
|
42 |
)
|
43 |
history[-1][1] = ""
|
44 |
for character in bot_message:
|
|
|
33 |
|
34 |
def user(user_message, history):
|
35 |
return gr.update(value="", interactive=False), history + [[user_message, None]]
|
36 |
+
def bot(user_message,history):
|
37 |
# chat_history.append(message) # Initialize chat history
|
38 |
bot_message = palm.chat(
|
39 |
context=context,
|
40 |
examples=examples,
|
41 |
+
messages=history[-1][1]
|
42 |
)
|
43 |
history[-1][1] = ""
|
44 |
for character in bot_message:
|