import json


def map_category_names(cat_to_name:str, classes:list) -> list:
    """Map category labels to category names

    Args:
        cat_to_name: Path to JSON file with category to name mapping
        classes: list of predicted classes

    Returns:
        List of category names
    """
    with open(cat_to_name, 'r') as f:
        cat_dict = json.load(f)
        category_names = []
        for c in classes:
            category_names.append(cat_dict[c])
        return category_names