INNER CODE UNIT · Python

load_config

jdh-algo/JoyHallo · scripts/app.py:636

def load_config(config_path: str) -> dict:
    """
    Loads the configuration file.

    Args:
        config_path (str): Path to the configuration file.

    Returns:
        dict: The configuration dictionary.
    """

    if config_path.endswith(".yaml"):
        return OmegaConf.load(config_path)
    if config_path.endswith(".py"):
        return import_filename(config_path).cfg
    raise ValueError("Unsupported format for config file")

args = argparse.Namespace()

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…