philschmid HF staff commited on
Commit
f7130c4
1 Parent(s): 4d500b9

Update handler.py

Browse files
Files changed (1) hide show
  1. 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, device=device)
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)