Spaces:
Sleeping
Sleeping
Commit
·
d07e69f
1
Parent(s):
4aeece0
Update app.py
Browse files
app.py
CHANGED
@@ -56,15 +56,14 @@ with gr.Blocks(theme=gr.themes.Soft()) as demo:
|
|
56 |
def user(user_message, history):
|
57 |
return gr.update(value=""), history.append([user_message, None])
|
58 |
|
59 |
-
|
60 |
|
61 |
def bot(history):
|
62 |
try:
|
63 |
bot_message = palm.chat(
|
64 |
context=context,
|
65 |
examples=examples,
|
66 |
-
|
67 |
-
messages=history
|
68 |
)
|
69 |
|
70 |
# history[-1][1] = ""
|
|
|
56 |
def user(user_message, history):
|
57 |
return gr.update(value=""), history.append([user_message, None])
|
58 |
|
|
|
59 |
|
60 |
def bot(history):
|
61 |
try:
|
62 |
bot_message = palm.chat(
|
63 |
context=context,
|
64 |
examples=examples,
|
65 |
+
messages=history[-1][0]
|
66 |
+
# messages=history
|
67 |
)
|
68 |
|
69 |
# history[-1][1] = ""
|