Commit
•
f7130c4
1
Parent(s):
4d500b9
Update handler.py
Browse files- handler.py +1 -1
handler.py
CHANGED
@@ -12,7 +12,7 @@ class EndpointHandler:
|
|
12 |
tokenizer = AutoTokenizer.from_pretrained(path)
|
13 |
model = AutoModelForCausalLM.from_pretrained(path, device_map="auto",torch_dtype=dtype)
|
14 |
# create inference pipeline
|
15 |
-
self.pipeline = pipeline("text-generation", model=model, tokenizer=tokenizer
|
16 |
|
17 |
def __call__(self, data: Any) -> List[List[Dict[str, float]]]:
|
18 |
inputs = data.pop("inputs", data)
|
|
|
12 |
tokenizer = AutoTokenizer.from_pretrained(path)
|
13 |
model = AutoModelForCausalLM.from_pretrained(path, device_map="auto",torch_dtype=dtype)
|
14 |
# create inference pipeline
|
15 |
+
self.pipeline = pipeline("text-generation", model=model, tokenizer=tokenizer)
|
16 |
|
17 |
def __call__(self, data: Any) -> List[List[Dict[str, float]]]:
|
18 |
inputs = data.pop("inputs", data)
|