def load(cls, path: str) -> ThemeClass:
        """Load a theme from a json file.

        Parameters:
            path: The filepath to read.
        """
        with open(path, encoding="utf-8") as fp:
            return cls.from_dict(json.load(fp, object_hook=fonts.as_font))
Load a theme from a json file.

        Parameters:
            path: The filepath to read.
        
gradio/themes/base.py