stefan-it's picture
pipeline: fix closing parenthesis :o
a27215a
raw
history blame
385 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 wtp.split(text, lang_code="de", style="ud"))}]