From 9805f35c6f3ef0b0fc4e3648aa3d6eddf0a907af Mon Sep 17 00:00:00 2001 From: Aarni Koskela Date: Thu, 4 Jan 2024 19:13:36 +0200 Subject: Ensure GRADIO_ANALYTICS_ENABLED is set early enough --- modules/launch_utils.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'modules/launch_utils.py') diff --git a/modules/launch_utils.py b/modules/launch_utils.py index 7ebdf0b4..c2a7ae93 100644 --- a/modules/launch_utils.py +++ b/modules/launch_utils.py @@ -27,8 +27,7 @@ dir_repos = "repositories" # Whether to default to printing command output default_command_live = (os.environ.get('WEBUI_LAUNCH_LIVE_OUTPUT') == "1") -if 'GRADIO_ANALYTICS_ENABLED' not in os.environ: - os.environ['GRADIO_ANALYTICS_ENABLED'] = 'False' +os.environ.setdefault('GRADIO_ANALYTICS_ENABLED', 'False') def check_python_version(): -- cgit v1.2.3