Răsfoiți Sursa

make it possible for user to enable gradio analytics by setting GRADIO_ANALYTICS_ENABLED=True

AUTOMATIC 2 ani în urmă
părinte
comite
c1294d849a
1 a modificat fișierele cu 2 adăugiri și 1 ștergeri
  1. 2 1
      launch.py

+ 2 - 1
launch.py

@@ -24,7 +24,8 @@ index_url = os.environ.get('INDEX_URL', "")
 stored_commit_hash = None
 stored_commit_hash = None
 skip_install = False
 skip_install = False
 
 
-os.environ['GRADIO_ANALYTICS_ENABLED'] = 'False'
+if 'GRADIO_ANALYTICS_ENABLED' not in os.environ:
+    os.environ['GRADIO_ANALYTICS_ENABLED'] = 'False'
 
 
 def check_python_version():
 def check_python_version():
     is_windows = platform.system() == "Windows"
     is_windows = platform.system() == "Windows"