awacke1 commited on
Commit
59fd959
1 Parent(s): f65d62d

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -60,7 +60,7 @@ model = BlenderbotForConditionalGeneration.from_pretrained(mname)
60
  tokenizer = BlenderbotTokenizer.from_pretrained(mname)
61
 
62
  def take_last_tokens(inputs, note_history, history):
63
- filterTokenCount = 128 # filter last 128 tokens
64
  if inputs['input_ids'].shape[1] > filterTokenCount:
65
  inputs['input_ids'] = torch.tensor([inputs['input_ids'][0][-filterTokenCount:].tolist()])
66
  inputs['attention_mask'] = torch.tensor([inputs['attention_mask'][0][-filterTokenCount:].tolist()])
 
60
  tokenizer = BlenderbotTokenizer.from_pretrained(mname)
61
 
62
  def take_last_tokens(inputs, note_history, history):
63
+ filterTokenCount = 128 # filter last 128 tokens
64
  if inputs['input_ids'].shape[1] > filterTokenCount:
65
  inputs['input_ids'] = torch.tensor([inputs['input_ids'][0][-filterTokenCount:].tolist()])
66
  inputs['attention_mask'] = torch.tensor([inputs['attention_mask'][0][-filterTokenCount:].tolist()])