kajdun commited on
Commit
1ecbe19
·
1 Parent(s): 2e55845

Update handler.py

Browse files
Files changed (1) hide show
  1. handler.py +1 -1
handler.py CHANGED
@@ -15,7 +15,7 @@ class EndpointHandler():
15
  self.model = AutoGPTQForCausalLM.from_quantized(path, device_map="auto", use_safetensors=True)
16
  self.tokenizer = AutoTokenizer.from_pretrained(path)
17
 
18
- def get_input_token_length(message: str) -> int:
19
  input_ids = self.tokenizer([message], return_tensors='np', add_special_tokens=False)['input_ids']
20
  return input_ids.shape[-1]
21
 
 
15
  self.model = AutoGPTQForCausalLM.from_quantized(path, device_map="auto", use_safetensors=True)
16
  self.tokenizer = AutoTokenizer.from_pretrained(path)
17
 
18
+ def get_input_token_length(self, message: str) -> int:
19
  input_ids = self.tokenizer([message], return_tensors='np', add_special_tokens=False)['input_ids']
20
  return input_ids.shape[-1]
21