From 0593bf048288bc2dfeb2f7f88e2669947d620df7 Mon Sep 17 00:00:00 2001 From: killua <1223086337@qq.com> Date: Sat, 18 May 2024 20:39:50 +0800 Subject: [PATCH] =?UTF-8?q?update:=20=E5=B0=86app=E5=90=AF=E5=8A=A8?= =?UTF-8?q?=E4=BD=8D=E7=BD=AE=E8=87=B3=E6=A0=B9=E7=9B=AE=E5=BD=95=E4=B8=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitignore | 5 ++++- app/main.py | 26 -------------------------- main.py | 31 +++++++++++++++++++++++-------- 3 files changed, 27 insertions(+), 35 deletions(-) delete mode 100644 app/main.py diff --git a/.gitignore b/.gitignore index 237b37e..c28b5ad 100644 --- a/.gitignore +++ b/.gitignore @@ -8,4 +8,7 @@ app.log /utils/tts/vits_model/ vits_model -nohup.out \ No newline at end of file +nohup.out + +/app/takway-ai.top.key +/app/takway-ai.top.pem \ No newline at end of file diff --git a/app/main.py b/app/main.py deleted file mode 100644 index 6f852f3..0000000 --- a/app/main.py +++ /dev/null @@ -1,26 +0,0 @@ -from app import app, Config -import uvicorn - - -if __name__ == "__main__": - uvicorn.run(app, host=Config.UVICORN.HOST, port=Config.UVICORN.PORT) - #uvicorn.run("app.main:app", host=Config.UVICORN.HOST, port=Config.UVICORN.PORT, workers=Config.UVICORN.WORKERS) - # _ooOoo_ # - # o8888888o # - # 88" . "88 # - # (| -_- |) # - # O\ = /O # - # ____/`---'\____ # - # . ' \\| |// `. # - # / \\||| : |||// \ # - # / _||||| -:- |||||- \ # - # | | \\\ - /// | | # - # \ .-\__ `-` ___/-. / # - # ___`. .' /--.--\ `. . __ # - # ."" '< `.___\_<|>_/___.' >'"". # - # | | : `- \`.;`\ _ /`;.`/ - ` : | | # - # \ \ `-. \_ __\ /__ _/ .-` / / # - # ======`-.____`-.___\_____/___.-`____.-'====== # - # `=---=' # - # ............................................. # - # 佛祖保佑 永无BUG # \ No newline at end of file diff --git a/main.py b/main.py index 93e804e..ba9c68a 100644 --- a/main.py +++ b/main.py @@ -1,9 +1,24 @@ -import os +from app import app, Config +import uvicorn -if __name__ == '__main__': - - script_path = os.path.join(os.path.dirname(__file__), 'app', 'main.py') - - # 使用exec函数执行脚本 - with open(script_path, 'r') as file: - exec(file.read()) +if __name__ == "__main__": + uvicorn.run(app, host=Config.UVICORN.HOST, port=Config.UVICORN.PORT) + # _ooOoo_ # + # o8888888o # + # 88" . "88 # + # (| -_- |) # + # O\ = /O # + # ____/`---'\____ # + # . ' \\| |// `. # + # / \\||| : |||// \ # + # / _||||| -:- |||||- \ # + # | | \\\ - /// | | # + # \ .-\__ `-` ___/-. / # + # ___`. .' /--.--\ `. . __ # + # ."" '< `.___\_<|>_/___.' >'"". # + # | | : `- \`.;`\ _ /`;.`/ - ` : | | # + # \ \ `-. \_ __\ /__ _/ .-` / / # + # ======`-.____`-.___\_____/___.-`____.-'====== # + # `=---=' # + # ............................................. # + # 佛祖保佑 永无BUG # \ No newline at end of file