teaevo commited on
Commit
81efcfe
·
1 Parent(s): 501ede0

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -59,7 +59,7 @@ def chatbot_response(user_message, history=[]):
59
  response = chatbot_tokenizer.decode(outputs[0], skip_special_tokens=True)
60
  '''
61
  # tokenize the new input sentence
62
- new_user_input_ids = chatbot_tokenizer.encode(input + chatbot_tokenizer.eos_token, return_tensors='pt')
63
 
64
  # append the new user input tokens to the chat history
65
  bot_input_ids = torch.cat([torch.LongTensor(history), new_user_input_ids], dim=-1)
 
59
  response = chatbot_tokenizer.decode(outputs[0], skip_special_tokens=True)
60
  '''
61
  # tokenize the new input sentence
62
+ new_user_input_ids = chatbot_tokenizer.encode(user_message + chatbot_tokenizer.eos_token, return_tensors='pt')
63
 
64
  # append the new user input tokens to the chat history
65
  bot_input_ids = torch.cat([torch.LongTensor(history), new_user_input_ids], dim=-1)