nugentc commited on
Commit
870b1fe
·
1 Parent(s): fbd4cfd

fix assignment issue

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -26,7 +26,7 @@ def chat(message, history=[]):
26
  last_set_of_ids = history[len(history)-1][3]
27
  bot_input_ids = torch.cat([last_set_of_ids, new_user_input_ids], dim=-1)
28
  else:
29
- new_user_input_ids
30
  response_ids = model.generate(bot_input_ids, max_length=500, pad_token_id=tokenizer.eos_token_id).tolist()
31
  response = tokenizer.decode(response_ids).replace("<|endoftext|>", "")
32
  bot_input_ids = torch.cat([last_set_of_ids, response_ids], dim=-1)
 
26
  last_set_of_ids = history[len(history)-1][3]
27
  bot_input_ids = torch.cat([last_set_of_ids, new_user_input_ids], dim=-1)
28
  else:
29
+ bot_input_ids = new_user_input_ids
30
  response_ids = model.generate(bot_input_ids, max_length=500, pad_token_id=tokenizer.eos_token_id).tolist()
31
  response = tokenizer.decode(response_ids).replace("<|endoftext|>", "")
32
  bot_input_ids = torch.cat([last_set_of_ids, response_ids], dim=-1)