-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Michele Dolfi <[email protected]>
- Loading branch information
1 parent
daf959e
commit 574d190
Showing
3 changed files
with
21 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
import os | ||
|
||
from docling_serve.app import app | ||
from docling_serve.helper_functions import _str_to_bool | ||
|
||
# Launch the FastAPI server | ||
if __name__ == "__main__": | ||
from uvicorn import run | ||
|
||
port = int(os.getenv("PORT", "5001")) | ||
workers = int(os.getenv("UVICORN_WORKERS", "1")) | ||
reload = _str_to_bool(os.getenv("RELOAD", "False")) | ||
run( | ||
app, | ||
host="0.0.0.0", | ||
port=port, | ||
workers=workers, | ||
timeout_keep_alive=600, | ||
reload=reload, | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters