Download src/utils.py from davesalvi/ispl_safe: direct link, hf CLI and curl.
- Browser
- Download file 322 Bytes
-
https://huggingface.co/davesalvi/ispl_safe/resolve/main/src/utils.py
- Command line
-
hf download hf://davesalvi/ispl_safe/src/utils.py
-
curl -L -o utils.py https://huggingface.co/davesalvi/ispl_safe/resolve/main/src/utils.py
322 Bytes
| import yaml | |
| def read_yaml(config_path): | |
| """ | |
| Read YAML file. | |
| :param config_path: path to the YAML config file. | |
| :type config_path: str | |
| :return: dictionary correspondent to YAML content | |
| :rtype dict | |
| """ | |
| with open(config_path, 'r') as f: | |
| config = yaml.safe_load(f) | |
| return config | |