Spaces:
Build error
Build error
Update app.py
Browse files
app.py
CHANGED
|
@@ -19,7 +19,7 @@ def respond(message, history=[]):
|
|
| 19 |
message_lower = message.lower()
|
| 20 |
response = responses.get(message_lower, responses["default"])
|
| 21 |
|
| 22 |
-
# Add the user message and bot response to the chat history
|
| 23 |
history.append({"role": "user", "content": message})
|
| 24 |
history.append({"role": "assistant", "content": response})
|
| 25 |
|
|
@@ -30,7 +30,7 @@ demo = gr.ChatInterface(
|
|
| 30 |
respond,
|
| 31 |
title="Offline Chatbot",
|
| 32 |
description="Type a message to chat with this friendly offline bot!",
|
| 33 |
-
type="messages",
|
| 34 |
)
|
| 35 |
|
| 36 |
# Launch the app
|
|
|
|
| 19 |
message_lower = message.lower()
|
| 20 |
response = responses.get(message_lower, responses["default"])
|
| 21 |
|
| 22 |
+
# Add the user message and bot response to the chat history
|
| 23 |
history.append({"role": "user", "content": message})
|
| 24 |
history.append({"role": "assistant", "content": response})
|
| 25 |
|
|
|
|
| 30 |
respond,
|
| 31 |
title="Offline Chatbot",
|
| 32 |
description="Type a message to chat with this friendly offline bot!",
|
| 33 |
+
type="messages",
|
| 34 |
)
|
| 35 |
|
| 36 |
# Launch the app
|