Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -740,7 +740,7 @@ agent = smolagents.CodeAgent(
|
|
| 740 |
verbosity_level=2, # show steps in logs for class demo
|
| 741 |
)
|
| 742 |
|
| 743 |
-
chat = gr.Chatbot(height=420
|
| 744 |
|
| 745 |
def respond(message, history):
|
| 746 |
try:
|
|
@@ -751,11 +751,9 @@ def respond(message, history):
|
|
| 751 |
if history is None:
|
| 752 |
history = []
|
| 753 |
|
| 754 |
-
#
|
| 755 |
-
history = history + [
|
| 756 |
-
|
| 757 |
-
{"role": "assistant", "content": out},
|
| 758 |
-
]
|
| 759 |
return "", history
|
| 760 |
|
| 761 |
with gr.Blocks(theme=gr.themes.Ocean()) as demo:
|
|
|
|
| 740 |
verbosity_level=2, # show steps in logs for class demo
|
| 741 |
)
|
| 742 |
|
| 743 |
+
chat = gr.Chatbot(height=420)
|
| 744 |
|
| 745 |
def respond(message, history):
|
| 746 |
try:
|
|
|
|
| 751 |
if history is None:
|
| 752 |
history = []
|
| 753 |
|
| 754 |
+
# MUST be list of lists, NOT tuples
|
| 755 |
+
history = history + [[message, out]]
|
| 756 |
+
|
|
|
|
|
|
|
| 757 |
return "", history
|
| 758 |
|
| 759 |
with gr.Blocks(theme=gr.themes.Ocean()) as demo:
|