runsdata commited on
Commit
3f67274
·
1 Parent(s): 16a48b6

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -109,10 +109,10 @@ def user(user_message, chatbot_history):
109
  return "", chatbot_history + [[user_message, ""]]
110
 
111
  # Function to handle AI's response
112
- def bot(chatbot_history):
113
- user_message = chatbot_history[-1][0] #This line is because we cleared the user_message previously in the user function above
114
  # Call the predict function to get the AI's response
115
- pairs = predict(chatbot_history, user_message)
116
  _, ai_response = pairs[-1] # Get the latest response
117
 
118
  response_in_progress = ""
 
109
  return "", chatbot_history + [[user_message, ""]]
110
 
111
  # Function to handle AI's response
112
+ def bot(chatbot_history, user_info):
113
+ user_message = chatbot_history[-1][0] # This line is because we cleared the user_message previously in the user function above
114
  # Call the predict function to get the AI's response
115
+ pairs = predict(chatbot_history, user_info, user_message)
116
  _, ai_response = pairs[-1] # Get the latest response
117
 
118
  response_in_progress = ""