mirror of
https://github.com/khoaliber/khoj.git
synced 2026-03-07 05:40:17 +00:00
Turn off Tokenizers Parallelism. Khoj doesn't support it right now
- Forking and multiprocess are problemantic in frozen python scenarios. This will cause issues when running App packaged by pyinstaller
This commit is contained in:
@@ -1,7 +1,8 @@
|
||||
# Standard Packages
|
||||
from platform import system
|
||||
import os
|
||||
import signal
|
||||
import sys
|
||||
from platform import system
|
||||
|
||||
# External Packages
|
||||
import uvicorn
|
||||
@@ -26,6 +27,9 @@ app.include_router(router)
|
||||
|
||||
|
||||
def run():
|
||||
# Turn Tokenizers Parallelism Off. App does not support it.
|
||||
os.environ["TOKENIZERS_PARALLELISM"] = 'false'
|
||||
|
||||
# Load config from CLI
|
||||
state.cli_args = sys.argv[1:]
|
||||
args = cli(state.cli_args)
|
||||
|
||||
Reference in New Issue
Block a user