INNER CODE UNIT · Python

GradioApp

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

class GradioApp(ModelServer):
    API_TYPES = {
        "VISION": (const.IMAGE_CLF, const.OBJECT_DETECTION),
        "NLP": (const.TXT_CLF,),
    }

    def __init__(
        self,
        api_type: str,
        model: Callable,
        input_types: Optional[Union[List, str]] = None,
        output_types: Optional[Union[List, str]] = None,
        preprocess_fn: Callable = None,
        postprocess_fn: Callable = None,
        preprocess_conf: Optional[dict] = None,
        postprocess_conf: Optional[dict] = None,
        **kwargs,
    ):

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…