Spaces:
Sleeping
Sleeping
Tuchuanhuhuhu
commited on
Commit
·
86a7227
1
Parent(s):
725655a
将设置API Key的方式改回视频里的样式
Browse files- ChuanhuChatbot.py +4 -1
ChuanhuChatbot.py
CHANGED
@@ -13,11 +13,14 @@ parse.add_argument('--api_key', type=str, help='OpenAI API Key', default="")
|
|
13 |
parse.add_argument('--share', type=bool, help='Share to public', default=False)
|
14 |
args = parse.parse_args()
|
15 |
|
16 |
-
my_api_key =
|
17 |
HIDE_MY_KEY = False # 如果你想在UI中隐藏你的 API 密钥,将此值设置为 True
|
18 |
|
19 |
gr.Chatbot.postprocess = postprocess
|
20 |
|
|
|
|
|
|
|
21 |
#if we are running in Docker
|
22 |
if os.environ.get('dockerrun') == 'yes':
|
23 |
dockerflag = True
|
|
|
13 |
parse.add_argument('--share', type=bool, help='Share to public', default=False)
|
14 |
args = parse.parse_args()
|
15 |
|
16 |
+
my_api_key = "" # 在这里输入你的 API 密钥
|
17 |
HIDE_MY_KEY = False # 如果你想在UI中隐藏你的 API 密钥,将此值设置为 True
|
18 |
|
19 |
gr.Chatbot.postprocess = postprocess
|
20 |
|
21 |
+
if args.api_key:
|
22 |
+
my_api_key = args.api_key
|
23 |
+
|
24 |
#if we are running in Docker
|
25 |
if os.environ.get('dockerrun') == 'yes':
|
26 |
dockerflag = True
|