aliacar commited on
Commit
ad64f9e
1 Parent(s): 526b184

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("conversational", 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)