Update __init__.py

This commit is contained in:
DrMelone 2025-04-08 18:55:07 +02:00 committed by GitHub
parent 65b5c6c0c7
commit f17befc853
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -73,8 +73,15 @@ def serve(
os.environ["LD_LIBRARY_PATH"] = ":".join(LD_LIBRARY_PATH)
import open_webui.main # we need set environment variables before importing main
from open_webui.env import UVICORN_WORKERS # Import the workers setting
uvicorn.run(open_webui.main.app, host=host, port=port, forwarded_allow_ips="*")
uvicorn.run(
open_webui.main.app,
host=host,
port=port,
forwarded_allow_ips="*",
workers=UVICORN_WORKERS
)
@app.command()