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