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:
Debanjum Singh Solanky 2022-08-18 23:14:39 +03:00
parent d4072974d7
commit 6c5c1c33c1

View file

@ -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)