pcuenq HF staff ArthurZ HF staff commited on
Commit
03883ed
1 Parent(s): db9ac27

Update model.py (#7)

Browse files

- Update model.py (0e03aec07d9b55e5857eaa7c9586923573485280)


Co-authored-by: Arthur Zucker <[email protected]>

Files changed (1) hide show
  1. model.py +1 -1
model.py CHANGED
@@ -33,7 +33,7 @@ def get_prompt(message: str, chat_history: list[tuple[str, str]],
33
 
34
  def get_input_token_length(message: str, chat_history: list[tuple[str, str]], system_prompt: str) -> int:
35
  prompt = get_prompt(message, chat_history, system_prompt)
36
- input_ids = tokenizer([prompt], return_tensors='np')['input_ids']
37
  return input_ids.shape[-1]
38
 
39
 
 
33
 
34
  def get_input_token_length(message: str, chat_history: list[tuple[str, str]], system_prompt: str) -> int:
35
  prompt = get_prompt(message, chat_history, system_prompt)
36
+ input_ids = tokenizer([prompt], return_tensors='np', add_special_tokens = False)['input_ids']
37
  return input_ids.shape[-1]
38
 
39