Spaces:
Runtime error
Runtime error
Commit
·
00bfccd
1
Parent(s):
68a7050
Update app.py
Browse files
app.py
CHANGED
@@ -1,7 +1,10 @@
|
|
1 |
|
2 |
-
from huggingface_hub import secrets
|
3 |
-
# 获取秘密的值
|
4 |
-
secret_value = secrets.get(OPENAI_API_KEY)
|
|
|
|
|
|
|
5 |
|
6 |
# 使用秘密的值
|
7 |
print(f"The secret value is: {secret_value}")
|
|
|
1 |
|
2 |
+
# from huggingface_hub import secrets
|
3 |
+
# # 获取秘密的值
|
4 |
+
# secret_value = secrets.get(OPENAI_API_KEY)
|
5 |
+
|
6 |
+
from os import environ
|
7 |
+
secrets_value = environ.get("OPENAI_API_KEY")
|
8 |
|
9 |
# 使用秘密的值
|
10 |
print(f"The secret value is: {secret_value}")
|