pipeline: fix split call
Browse files- pipeline.py +1 -1
pipeline.py
CHANGED
@@ -6,4 +6,4 @@ class PreTrainedPipeline:
|
|
6 |
self.model = WtP(model_name_or_model="wtp-canine-s-de-hist-12l", hub_prefix="stefan-it")
|
7 |
|
8 |
def __call__(self, inputs: str) -> List[Dict]:
|
9 |
-
return [{"generated_text": "</s>\n".join(sent.strip() for sent in
|
|
|
6 |
self.model = WtP(model_name_or_model="wtp-canine-s-de-hist-12l", hub_prefix="stefan-it")
|
7 |
|
8 |
def __call__(self, inputs: str) -> List[Dict]:
|
9 |
+
return [{"generated_text": "</s>\n".join(sent.strip() for sent in self.model.split(text, lang_code="de", style="ud"))}]
|