镜像自地址
https://github.com/binary-husky/gpt_academic.git
已同步 2025-12-06 14:36:48 +00:00
fix sub-path deploy
这个提交包含在:
19
main.py
19
main.py
@@ -171,4 +171,21 @@ def auto_opentab_delay():
|
||||
threading.Thread(target=auto_update, name="self-upgrade", daemon=True).start()
|
||||
|
||||
auto_opentab_delay()
|
||||
demo.queue(concurrency_count=CONCURRENT_COUNT).launch(server_name="0.0.0.0", server_port=PORT, auth=AUTHENTICATION)
|
||||
# demo.queue(concurrency_count=CONCURRENT_COUNT).launch(server_name="0.0.0.0", server_port=PORT, auth=AUTHENTICATION)
|
||||
demo.queue(concurrency_count=CONCURRENT_COUNT)
|
||||
|
||||
CUSTOM_PATH = '/chatgpt'
|
||||
|
||||
import uvicorn
|
||||
from fastapi import FastAPI
|
||||
|
||||
app = FastAPI()
|
||||
|
||||
@app.get("/")
|
||||
def read_main():
|
||||
return {"message": "NULL"}
|
||||
|
||||
app = gr.mount_gradio_app(app, demo, path=CUSTOM_PATH)
|
||||
|
||||
if __name__ == '__main__':
|
||||
uvicorn.run(app, host="0.0.0.0", port=PORT)
|
||||
|
||||
在新工单中引用
屏蔽一个用户