From e4929a9ed79f8d461b387f8b013b23ad23f3cb90 Mon Sep 17 00:00:00 2001 From: rsl8 <138326583+rsl8@users.noreply.github.com> Date: Sat, 10 Feb 2024 18:42:18 +0100 Subject: [PATCH] fix: do not overwrite $GRADIO_SERVER_PORT if it is already set (#1921) --- launch.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/launch.py b/launch.py index 36fad9e01..db174f54c 100644 --- a/launch.py +++ b/launch.py @@ -10,7 +10,8 @@ os.environ["PYTORCH_ENABLE_MPS_FALLBACK"] = "1" os.environ["PYTORCH_MPS_HIGH_WATERMARK_RATIO"] = "0.0" -os.environ["GRADIO_SERVER_PORT"] = "7865" +if "GRADIO_SERVER_PORT" not in os.environ: + os.environ["GRADIO_SERVER_PORT"] = "7865" ssl._create_default_https_context = ssl._create_unverified_context