fix: do not overwrite $GRADIO_SERVER_PORT if it is already set (#1921)

This commit is contained in:
rsl8 2024-02-10 18:42:18 +01:00 committed by Manuel Schmid
parent b7715b0a0c
commit e4929a9ed7
No known key found for this signature in database
GPG Key ID: 32C4F7569B40B84B
1 changed files with 2 additions and 1 deletions

View File

@ -10,7 +10,8 @@ os.chdir(root)
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