betajuned commited on
Commit
e5f4930
1 Parent(s): b515959

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -17,7 +17,7 @@ def predict(input, history=[]):
17
  bot_input_ids = torch.cat([torch.tensor(history), new_user_input_ids], dim=-1) if history else new_user_input_ids
18
 
19
  # Generate a response
20
- chat_history_ids = model.generate(bot_input_ids, max_length=50, pad_token_id=tokenizer.eos_token_id)
21
 
22
  # Convert the tokens to text
23
  response = tokenizer.decode(chat_history_ids[:, bot_input_ids.shape[-1]:][0], skip_special_tokens=True)
 
17
  bot_input_ids = torch.cat([torch.tensor(history), new_user_input_ids], dim=-1) if history else new_user_input_ids
18
 
19
  # Generate a response
20
+ chat_history_ids = model.generate(bot_input_ids, max_length=200, pad_token_id=tokenizer.eos_token_id)
21
 
22
  # Convert the tokens to text
23
  response = tokenizer.decode(chat_history_ids[:, bot_input_ids.shape[-1]:][0], skip_special_tokens=True)