alexpantex's picture
Upload scripts/utils.py with huggingface_hub
4a1948c verified
raw
history blame contribute delete
427 Bytes
import yaml
import os
def load_config(config_name="config.yaml"):
"""
Load configuration from a YAML file.
Args:
config_path: Path to the YAML configuration file.
Returns:
Dictionary with the configuration data.
"""
from config.data_paths import ROOT_DIR
with open(os.path.join(ROOT_DIR, 'config', config_name), "r") as file:
config = yaml.safe_load(file)
return config