from typing import Mapping
import json


def load_categories(filename: str) -> Mapping[int, str]:
    """
    Load categories from specified file.

    :param filename: path to category filename
    :return: a dictionary of flowers id and name
    """
    with open(filename, 'r') as f:
        cat_to_name = json.load(f)
    return cat_to_name