Spaces:
Sleeping
Sleeping
File size: 468 Bytes
0930d33 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 |
import yaml
from utils import logger
logger = logger.get_logger()
def load_config():
try:
with open('config.yaml', 'r') as file:
config_data = yaml.load(file, Loader=yaml.FullLoader)
logger.info("Successfully loaded the config.")
return config_data
except Exception as e:
logger.error(f"Unexpected error occurred while loading the config: {e}")
raise Exception(f"Error loading configuration: {e}")
|