yunshi1207 commited on
Commit
00bfccd
·
1 Parent(s): 68a7050

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -3
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}")