Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Disable Gradio Analytics #1165

Merged
merged 2 commits into from
Nov 6, 2023

Commits on Nov 5, 2023

  1. Disable Gradio Analytics

    Gradio analytics can be disabled by either using the kwargs `enable_analytics` on `gr.Blocks`, or by setting the env variable `GRADIO_ANALYTICS_ENABLED` to something different from `True`.
    
    Since that Gradio does not seem to respect their code contract (around `enable_analytics`), and that they are performing other operations only based on the value of `GRADIO_ANALYTICS_ENABLED` (c.f. `gradio.strings` https://github.com/gradio-app/gradio/blob/main/gradio/strings.py#L39), we are disabling gradio analytics by setting the required env variable to `False`.
    
    Note: Setting an environment variables using `os.environ['foo'] = 'bar'` on system that are not based on unix might not work.
    
    c.f. https://docs.python.org/3/library/os.html#os.environ for details on how `os.environ` works and all its caveats
    lopagela committed Nov 5, 2023
    Configuration menu
    Copy the full SHA
    baa2fe6 View commit details
    Browse the repository at this point in the history

Commits on Nov 6, 2023

  1. Configuration menu
    Copy the full SHA
    3561a6d View commit details
    Browse the repository at this point in the history