nugentc commited on
Commit
08565bb
·
1 Parent(s): 69db65c

fix preassigment

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -14,7 +14,7 @@ def chat(message, history):
14
  f1 = lambda x: x[2]
15
  f2 = lambda x: x[3]
16
  bot_input_ids = [f(item) for item in history for f in (f1, f2)]
17
- bot_input_ids = torch.cat([bot_input_ids, new_user_input_ids], dim=-1) if chat_history_ids is not None else new_user_input_ids
18
  # generated a response while limiting the total chat history to 1000 tokens,
19
  chat_history_ids = model.generate(bot_input_ids, max_length=5000, pad_token_id=tokenizer.eos_token_id)
20
  print("The text is ", [text])
 
14
  f1 = lambda x: x[2]
15
  f2 = lambda x: x[3]
16
  bot_input_ids = [f(item) for item in history for f in (f1, f2)]
17
+ bot_input_ids = torch.cat([bot_input_ids, new_user_input_ids], dim=-1)
18
  # generated a response while limiting the total chat history to 1000 tokens,
19
  chat_history_ids = model.generate(bot_input_ids, max_length=5000, pad_token_id=tokenizer.eos_token_id)
20
  print("The text is ", [text])