Spaces:
Sleeping
Sleeping
Create modules/config_loader.py
Browse files- modules/config_loader.py +14 -0
modules/config_loader.py
ADDED
@@ -0,0 +1,14 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import json
|
2 |
+
from pathlib import Path
|
3 |
+
|
4 |
+
def load_config():
|
5 |
+
config_path = Path(__file__).parent.parent / 'config.json'
|
6 |
+
try:
|
7 |
+
with open(config_path) as f:
|
8 |
+
return json.load(f)
|
9 |
+
except FileNotFoundError:
|
10 |
+
return {
|
11 |
+
"default_model": "gpt-3.5-turbo",
|
12 |
+
"max_file_size": 100000,
|
13 |
+
"enable_logging": True
|
14 |
+
}
|