teaevo commited on
Commit
8b94979
·
1 Parent(s): 70f2578

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -60,7 +60,7 @@ def chatbot_response(user_message):
60
  response = chatbot_tokenizer.decode(outputs[0], skip_special_tokens=True)
61
  '''
62
  # encode the new user input, add the eos_token and return a tensor in Pytorch
63
- new_user_input_ids = chatbot_tokenizer.encode("User: " + user_message + chatbot_tokenizer.eos_token, return_tensors='pt')
64
 
65
  # append the new user input tokens to the chat history
66
  bot_input_ids = torch.cat([chat_history_ids, new_user_input_ids], dim=-1) if new_chat is False else new_user_input_ids
 
60
  response = chatbot_tokenizer.decode(outputs[0], skip_special_tokens=True)
61
  '''
62
  # encode the new user input, add the eos_token and return a tensor in Pytorch
63
+ new_user_input_ids = chatbot_tokenizer.encode(user_message + chatbot_tokenizer.eos_token, return_tensors='pt')
64
 
65
  # append the new user input tokens to the chat history
66
  bot_input_ids = torch.cat([chat_history_ids, new_user_input_ids], dim=-1) if new_chat is False else new_user_input_ids