(self, input: Union[Input, List[Input]])
| 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': |