Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -55,7 +55,12 @@ def clear():
|
|
| 55 |
|
| 56 |
def show():
|
| 57 |
global messages
|
| 58 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 59 |
|
| 60 |
|
| 61 |
with gr.Blocks() as chatHistory:
|
|
|
|
| 55 |
|
| 56 |
def show():
|
| 57 |
global messages
|
| 58 |
+
chats = ""
|
| 59 |
+
for msg in messages:
|
| 60 |
+
if msg['role'] != 'system':
|
| 61 |
+
chats += msg['role'] + ": " + msg['content'] + "\n\n"
|
| 62 |
+
|
| 63 |
+
return chats
|
| 64 |
|
| 65 |
|
| 66 |
with gr.Blocks() as chatHistory:
|