def from_dict(cls, theme: dict[str, dict[str, str]]) -> ThemeClass:
        """Create a theme instance from a dictionary representation.

        Parameters:
            theme: The dictionary representation of the theme.
        """
        new_theme = cls()
        for prop, value in theme["theme"].items():
            setattr(new_theme, prop, value)

        # For backwards compatibility, load attributes in base theme not in the loaded theme from the base theme.
        base = Base()
        for attr in base.__dict__:
            if not attr.startswith("_") and not hasattr(new_theme, attr):
                setattr(new_theme, attr, getattr(base, attr))

        return new_theme
Create a theme instance from a dictionary representation.

        Parameters:
            theme: The dictionary representation of the theme.
        
gradio/themes/base.py