INNER CODE UNIT · Python

x

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

            x = data_processor.preprocess(x, **self.preprocess_conf)
        x = self.model(x)
        if data_processor.postprocess_fn:
            x = data_processor.postprocess(x, **self.postprocess_conf)
        return x

    def run(self, share: bool = False, gr_interface_conf: Optional[dict] = None):
        if not gr_interface_conf:
            gr_interface_conf = {}

        gr.Interface(
            fn=self.api_type_func[self.api_type],
            inputs=self.input_types,
            outputs=self.output_types,
            title=self.title,
            description=self.desc,
            **gr_interface_conf,
        ).launch(share=share)

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…