Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -18,7 +18,7 @@ logging.basicConfig(
|
|
18 |
my_api_key = "" # 在这里输入你的 API 密钥
|
19 |
|
20 |
# if we are running in Docker
|
21 |
-
if os.environ.get("dockerrun") == "yes":
|
22 |
dockerflag = True
|
23 |
else:
|
24 |
dockerflag = False
|
@@ -26,10 +26,7 @@ else:
|
|
26 |
authflag = False
|
27 |
|
28 |
if dockerflag:
|
29 |
-
my_api_key = os.environ.get("
|
30 |
-
if my_api_key == "empty":
|
31 |
-
logging.error("Please give a api key!")
|
32 |
-
sys.exit(1)
|
33 |
# auth
|
34 |
username = os.environ.get("USERNAME")
|
35 |
password = os.environ.get("PASSWORD")
|
|
|
18 |
my_api_key = "" # 在这里输入你的 API 密钥
|
19 |
|
20 |
# if we are running in Docker
|
21 |
+
if os.environ.get("dockerrun", "yes") == "yes":
|
22 |
dockerflag = True
|
23 |
else:
|
24 |
dockerflag = False
|
|
|
26 |
authflag = False
|
27 |
|
28 |
if dockerflag:
|
29 |
+
my_api_key = os.environ.get("API_TOKEN","")
|
|
|
|
|
|
|
30 |
# auth
|
31 |
username = os.environ.get("USERNAME")
|
32 |
password = os.environ.get("PASSWORD")
|