init
Browse files
api_key.txt
CHANGED
@@ -1,2 +1,2 @@
|
|
1 |
-
my_api_key=
|
2 |
HIDE_MY_KEY= False
|
|
|
1 |
+
my_api_key=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
|
2 |
HIDE_MY_KEY= False
|
app.py
CHANGED
@@ -427,11 +427,11 @@ with gr.Blocks(
|
|
427 |
|
428 |
logging.info(
|
429 |
colorama.Back.GREEN
|
430 |
-
+ "\n
|
431 |
+ colorama.Style.RESET_ALL
|
432 |
)
|
433 |
# 默认开启本地服务器,默认可以直接从IP访问,默认不创建公开分享链接
|
434 |
-
demo.title = "
|
435 |
|
436 |
if __name__ == "__main__":
|
437 |
reload_javascript()
|
|
|
427 |
|
428 |
logging.info(
|
429 |
colorama.Back.GREEN
|
430 |
+
+ "\n温馨提示:访问 http://localhost:7860 查看界面"
|
431 |
+ colorama.Style.RESET_ALL
|
432 |
)
|
433 |
# 默认开启本地服务器,默认可以直接从IP访问,默认不创建公开分享链接
|
434 |
+
demo.title = "中建chatgpt"
|
435 |
|
436 |
if __name__ == "__main__":
|
437 |
reload_javascript()
|
auth.json
ADDED
@@ -0,0 +1,4 @@
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"username": "zjzn",
|
3 |
+
"password": "zjzn"
|
4 |
+
}
|
test.py
ADDED
@@ -0,0 +1,6 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import os
|
2 |
+
os.path.exists("api_key.txt")
|
3 |
+
with open("api_key.txt", "r") as f:
|
4 |
+
my_api_key = f.read().strip()
|
5 |
+
# my_api_key = os.environ.get("my_api_key")
|
6 |
+
print(my_api_key)
|