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

Method _build_dict

modelscope/preprocessors/multi_modal.py:127–133  ·  view source on GitHub ↗
(self, input: Union[Input, List[Input]])

Source from the content-addressed store, hash-verified

125
126 # just for modelscope demo
127 def _build_dict(self, input: Union[Input, List[Input]]) -> Dict[str, Any]:
128 data = dict()
129 if not isinstance(input, tuple) and not isinstance(input, list):
130 input = (input, )
131 for key, item in zip(self.keys, input):
132 data[key] = item
133 return data
134
135 def _ofa_input_compatibility_conversion(self, data): # fake
136 if 'image' in data and self.cfg.model.get('type', None) == 'ofa':

Callers 1

__call__Method · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected