mirror of
https://github.com/khoaliber/khoj.git
synced 2026-03-10 13:26:13 +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
|
# Standard Packages
|
||||||
from platform import system
|
import os
|
||||||
import signal
|
import signal
|
||||||
import sys
|
import sys
|
||||||
|
from platform import system
|
||||||
|
|
||||||
# External Packages
|
# External Packages
|
||||||
import uvicorn
|
import uvicorn
|
||||||
@@ -26,6 +27,9 @@ app.include_router(router)
|
|||||||
|
|
||||||
|
|
||||||
def run():
|
def run():
|
||||||
|
# Turn Tokenizers Parallelism Off. App does not support it.
|
||||||
|
os.environ["TOKENIZERS_PARALLELISM"] = 'false'
|
||||||
|
|
||||||
# Load config from CLI
|
# Load config from CLI
|
||||||
state.cli_args = sys.argv[1:]
|
state.cli_args = sys.argv[1:]
|
||||||
args = cli(state.cli_args)
|
args = cli(state.cli_args)
|
||||||
|
|||||||
Reference in New Issue
Block a user