mirror of
https://github.com/modelscope/modelscope.git
synced 2025-12-24 03:59:23 +01:00
merge with master 2/2
This commit is contained in:
@@ -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]:
|
||||
|
||||
Reference in New Issue
Block a user