smjain commited on
Commit
e4c7064
·
1 Parent(s): 1fc8b87

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -8,7 +8,7 @@ mdl = BlenderbotForConditionalGeneration.from_pretrained("facebook/blenderbot-40
8
 
9
  def converse(user_input, chat_history=[]):
10
  #tkn_ids = chat_tkn(input(">> User:") + chat_tkn.eos_token, return_tensors='pt')
11
- user_input_ids = chat_tkn(input + chat_tkn.eos_token, return_tensors='pt')
12
 
13
  # append the new user input tokens to the chat history
14
  bot_input_ids = torch.cat([torch.LongTensor(history), user_input_ids], dim=-1)
 
8
 
9
  def converse(user_input, chat_history=[]):
10
  #tkn_ids = chat_tkn(input(">> User:") + chat_tkn.eos_token, return_tensors='pt')
11
+ user_input_ids = chat_tkn(user_input + chat_tkn.eos_token, return_tensors='pt')
12
 
13
  # append the new user input tokens to the chat history
14
  bot_input_ids = torch.cat([torch.LongTensor(history), user_input_ids], dim=-1)