teaevo commited on
Commit
3933abd
·
1 Parent(s): d69d5ee

Update app.py

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