stefan-it's picture
pipeline: update model name
7af9bd1
raw
history blame contribute delete
No virus
407 Bytes
from typing import List, Dict
from wtpsplit import WtP
class PreTrainedPipeline:
def __init__(self, path=""):
self.model = WtP(model_name_or_model="wtp-canine-s-de-hist-12l", hub_prefix="stefan-it")
def __call__(self, inputs: str) -> List[Dict]:
return [{"generated_text": "</s>\n".join(sent.strip() for sent in self.model.split(inputs.strip(), lang_code="de", style="onb-ner"))}]