Update app.py
Browse files
app.py
CHANGED
|
@@ -7,22 +7,15 @@ For more information on `huggingface_hub` Inference API support, please check th
|
|
| 7 |
current_messages = []
|
| 8 |
|
| 9 |
|
| 10 |
-
def
|
| 11 |
-
message,
|
| 12 |
-
history: list[tuple[str, str]]
|
| 13 |
-
):
|
| 14 |
# messages = [{"role": "system", "content": system_message}]
|
| 15 |
|
| 16 |
current_messages.append(message)
|
| 17 |
print(message)
|
| 18 |
print(history)
|
|
|
|
| 19 |
return current_messages
|
| 20 |
|
| 21 |
-
"""
|
| 22 |
-
For information on how to customize the ChatInterface, peruse the gradio docs: https://www.gradio.app/docs/chatinterface
|
| 23 |
-
"""
|
| 24 |
-
demo = gr.ChatInterface(respond)
|
| 25 |
-
|
| 26 |
|
| 27 |
-
|
| 28 |
-
|
|
|
|
| 7 |
current_messages = []
|
| 8 |
|
| 9 |
|
| 10 |
+
def memory_test(message, history):
|
|
|
|
|
|
|
|
|
|
| 11 |
# messages = [{"role": "system", "content": system_message}]
|
| 12 |
|
| 13 |
current_messages.append(message)
|
| 14 |
print(message)
|
| 15 |
print(history)
|
| 16 |
+
print(current_messages)
|
| 17 |
return current_messages
|
| 18 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 19 |
|
| 20 |
+
demo = gr.ChatInterface(fn=memory_test, title="memory test")
|
| 21 |
+
demo.launch()
|