Spaces:
Sleeping
Sleeping
binary-husky
commited on
Commit
•
889b719
1
Parent(s):
a5c122b
私密配置
Browse files# config_private.py放自己的秘密如API和代理网址
# 读取时首先看是否存在私密的config_private配置文件(不受git管控),如果有,则覆盖原config文件
- predict.py +3 -1
predict.py
CHANGED
@@ -7,7 +7,9 @@ import traceback
|
|
7 |
import requests
|
8 |
import importlib
|
9 |
|
10 |
-
|
|
|
|
|
11 |
except: from config import proxies, API_URL, API_KEY, TIMEOUT_SECONDS
|
12 |
|
13 |
timeout_bot_msg = 'Request timeout, network error. please check proxy settings in config.py.'
|
|
|
7 |
import requests
|
8 |
import importlib
|
9 |
|
10 |
+
# config_private.py放自己的秘密如API和代理网址
|
11 |
+
# 读取时首先看是否存在私密的config_private配置文件(不受git管控),如果有,则覆盖原config文件
|
12 |
+
try: from config_private import proxies, API_URL, API_KEY, TIMEOUT_SECONDS
|
13 |
except: from config import proxies, API_URL, API_KEY, TIMEOUT_SECONDS
|
14 |
|
15 |
timeout_bot_msg = 'Request timeout, network error. please check proxy settings in config.py.'
|