PyTorch
Safetensors
falcon
custom_code
Inference Endpoints
AIDSC commited on
Commit
509fadd
1 Parent(s): b40f1b2

Update handler.py

Browse files
Files changed (1) hide show
  1. handler.py +1 -1
handler.py CHANGED
@@ -19,7 +19,7 @@ class EndpointHandler():
19
  self.model = AutoModelForCausalLM.from_pretrained(path, trust_remote_code=True, device_map="auto")
20
  self.model = self.accelerator.prepare(self.model)
21
  self.tokenizer = AutoTokenizer.from_pretrained(path)
22
- self.options_tokens = [self.tokenizer.encode(choice)[-1] for choice in ["0", "1", "2", "3"]]
23
 
24
  def __call__(self, data: Dict[str, Any]) -> List[Dict[str, Any]]:
25
  """
 
19
  self.model = AutoModelForCausalLM.from_pretrained(path, trust_remote_code=True, device_map="auto")
20
  self.model = self.accelerator.prepare(self.model)
21
  self.tokenizer = AutoTokenizer.from_pretrained(path)
22
+ self.options_tokens = [self.tokenizer.encode(choice)[-1] for choice in ["A", "B", "C", "D"]]
23
 
24
  def __call__(self, data: Dict[str, Any]) -> List[Dict[str, Any]]:
25
  """