Browse Source

merge with master 2/2

master
智丞 3 years ago
parent
commit
fcc5740238
1 changed files with 1 additions and 0 deletions
  1. +1
    -0
      modelscope/preprocessors/nlp.py

+ 1
- 0
modelscope/preprocessors/nlp.py View File

@@ -198,6 +198,7 @@ class ZeroShotClassificationPreprocessor(Preprocessor):
self.sequence_length = kwargs.pop('sequence_length', 512)
self.candidate_labels = kwargs.pop('candidate_labels')
self.hypothesis_template = kwargs.pop('hypothesis_template', '{}')
self.tokenizer = SbertTokenizer.from_pretrained(self.model_dir)

@type_assert(object, str)
def __call__(self, data: str) -> Dict[str, Any]:


Loading…
Cancel
Save