alexpantex commited on
Commit
4a1948c
·
verified ·
1 Parent(s): 77e804a

Upload scripts/utils.py with huggingface_hub

Browse files
Files changed (1) hide show
  1. scripts/utils.py +15 -0
scripts/utils.py ADDED
@@ -0,0 +1,15 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import yaml
2
+ import os
3
+
4
+ def load_config(config_name="config.yaml"):
5
+ """
6
+ Load configuration from a YAML file.
7
+ Args:
8
+ config_path: Path to the YAML configuration file.
9
+ Returns:
10
+ Dictionary with the configuration data.
11
+ """
12
+ from config.data_paths import ROOT_DIR
13
+ with open(os.path.join(ROOT_DIR, 'config', config_name), "r") as file:
14
+ config = yaml.safe_load(file)
15
+ return config