habi01 commited on
Commit
a12f2c6
·
verified ·
1 Parent(s): 02152fb

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
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 as clean labels
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", # Use openai-style 'role' and 'content' keys
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