arubenruben
commited on
Commit
•
eb14d01
1
Parent(s):
577f794
Update deploy_pipeline.py
Browse files- deploy_pipeline.py +2 -1
deploy_pipeline.py
CHANGED
@@ -36,12 +36,13 @@ class TokenizeAndAlignLabelsStep():
|
|
36 |
|
37 |
previous_word_idx = word_idx
|
38 |
|
39 |
-
tokenized_inputs["tokens"] = tokenizer.
|
40 |
tokenized_inputs["labels_mask"] = labels_mask
|
41 |
|
42 |
return tokenized_inputs
|
43 |
|
44 |
|
|
|
45 |
class BERT_CRF_Pipeline(Pipeline):
|
46 |
|
47 |
def _sanitize_parameters(self, **kwargs):
|
|
|
36 |
|
37 |
previous_word_idx = word_idx
|
38 |
|
39 |
+
tokenized_inputs["tokens"] = tokenizer.decode(tokens, skip_special_tokens=True)
|
40 |
tokenized_inputs["labels_mask"] = labels_mask
|
41 |
|
42 |
return tokenized_inputs
|
43 |
|
44 |
|
45 |
+
|
46 |
class BERT_CRF_Pipeline(Pipeline):
|
47 |
|
48 |
def _sanitize_parameters(self, **kwargs):
|