Update handler.py
Browse files- 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 ["
|
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 |
"""
|