Spaces:
Runtime error
Runtime error
JohnSmith9982
commited on
Commit
•
d6e6d36
1
Parent(s):
b99f721
Upload config.py
Browse files- modules/config.py +5 -2
modules/config.py
CHANGED
@@ -31,8 +31,11 @@ if os.path.exists("config.json"):
|
|
31 |
config = json.load(f)
|
32 |
else:
|
33 |
config = {}
|
34 |
-
|
35 |
-
|
|
|
|
|
|
|
36 |
|
37 |
if os.path.exists("api_key.txt"):
|
38 |
logging.info("检测到api_key.txt文件,正在进行迁移...")
|
|
|
31 |
config = json.load(f)
|
32 |
else:
|
33 |
config = {}
|
34 |
+
|
35 |
+
if 'UI_LANGUAGE' in os.environ:
|
36 |
+
language = os.environ['LANGUAGE']
|
37 |
+
else:
|
38 |
+
language = config.get("language", "auto")
|
39 |
|
40 |
if os.path.exists("api_key.txt"):
|
41 |
logging.info("检测到api_key.txt文件,正在进行迁移...")
|