bytedancerneat commited on
Commit
09179c9
·
verified ·
1 Parent(s): 0ab1e65

Update util/config_util.py

Browse files
Files changed (1) hide show
  1. util/config_util.py +20 -21
util/config_util.py CHANGED
@@ -1,21 +1,20 @@
1
- import os
2
- import json
3
- import logging
4
- import bytedenv
5
- import configparser
6
-
7
- ROOT_PATH = os.path.split(os.path.split(os.path.abspath(__file__))[0])[0]
8
-
9
-
10
- def read_config():
11
- config_file = ROOT_PATH + "\conf\config.ini"
12
- config_ini = configparser.ConfigParser()
13
- config_ini.read(config_file)
14
- model_name = "DouBao128Pro"
15
- return config_ini
16
-
17
- def read_json(filepath):
18
- with open(filepath, 'r') as f:
19
- result = json.load(f)
20
- return result
21
-
 
1
+ import os
2
+ import json
3
+ import logging
4
+ import configparser
5
+
6
+ ROOT_PATH = os.path.split(os.path.split(os.path.abspath(__file__))[0])[0]
7
+
8
+
9
+ def read_config():
10
+ config_file = ROOT_PATH + "\conf\config.ini"
11
+ config_ini = configparser.ConfigParser()
12
+ config_ini.read(config_file)
13
+ model_name = "DouBao128Pro"
14
+ return config_ini
15
+
16
+ def read_json(filepath):
17
+ with open(filepath, 'r') as f:
18
+ result = json.load(f)
19
+ return result
20
+