MCPcopy Create free account
hub / github.com/modelscope/modelscope / __init__

Method __init__

modelscope/preprocessors/multi_modal.py:346–359  ·  view source on GitHub ↗
(self,
                 model_dir: str,
                 mode: str = ModeKeys.INFERENCE,
                 tokenizer_max_length: int = 25,
                 *args,
                 **kwargs)

Source from the content-addressed store, hash-verified

344class MPlugPreprocessor(Preprocessor):
345
346 def __init__(self,
347 model_dir: str,
348 mode: str = ModeKeys.INFERENCE,
349 tokenizer_max_length: int = 25,
350 *args,
351 **kwargs):
352 super().__init__(*args, **kwargs)
353 self.model_dir = model_dir
354 self.mode = mode
355 self.tokenizer_max_length = tokenizer_max_length
356
357 self._tokenizer = None
358 self._patch_resize_transform = None
359 self._image_map = {}
360
361 @property
362 def tokenizer(self):

Callers

nothing calls this directly

Calls 1

__init__Method · 0.45

Tested by

no test coverage detected