diff --git a/private_gpt/__init__.py b/private_gpt/__init__.py index 360b53a4..e41700c5 100644 --- a/private_gpt/__init__.py +++ b/private_gpt/__init__.py @@ -24,4 +24,5 @@ os.environ["GRADIO_ANALYTICS_ENABLED"] = "False" # os.environ["ANONYMIZED_TELEMETRY"] = "False" # adding tiktoken cache path within repo to be able to run in offline environment. -os.environ["TIKTOKEN_CACHE_DIR"] = "tiktoken_cache" +# Only set to cache within the repo if the user has not declared a cache path +os.environ.setdefault("TIKTOKEN_CACHE_DIR", "tiktoken_cache")