INNER CODE UNIT · Python

setup

aniketmaurya/chitra · chitra/serve/app.py:47

    def setup(
        self,
        **kwargs,
    ):
        if self.api_type in (const.IMAGE_CLF, const.OBJECT_DETECTION):
            self.api_type_func[self.api_type] = self.single_x_classification
        elif self.api_type == const.TXT_CLF:
            self.api_type_func[self.api_type] = self.single_x_classification
        else:
            raise NotImplementedError(f"api_type={self.api_type} not implemented yet!")

        if not self.input_types:
            self.input_types = self.get_input_type(**kwargs)

        if not self.output_types:
            self.output_types = "json"

    def get_input_type(self, **kwargs):

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…