private-gpt/private_gpt
lopagela 6583dc84c0
feat: Disable Gradio Analytics (#1165)
* 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

* Update private_gpt/__init__.py
2023-11-06 14:31:26 +01:00
..
components Feature/sagemaker embedding (#1161) 2023-11-05 16:16:49 +01:00
open_ai Next version of PrivateGPT (#1077) 2023-10-19 16:04:35 +02:00
server Next version of PrivateGPT (#1077) 2023-10-19 16:04:35 +02:00
settings Feature/sagemaker embedding (#1161) 2023-11-05 16:16:49 +01:00
ui feat: Disable Gradio Analytics (#1165) 2023-11-06 14:31:26 +01:00
utils Next version of PrivateGPT (#1077) 2023-10-19 16:04:35 +02:00
__init__.py feat: Disable Gradio Analytics (#1165) 2023-11-06 14:31:26 +01:00
__main__.py feat: Drop loguru and use builtin `logging` (#1133) 2023-10-29 19:11:02 +01:00
constants.py Next version of PrivateGPT (#1077) 2023-10-19 16:04:35 +02:00
di.py Next version of PrivateGPT (#1077) 2023-10-19 16:04:35 +02:00
main.py feat: Drop loguru and use builtin `logging` (#1133) 2023-10-29 19:11:02 +01:00
paths.py Next version of PrivateGPT (#1077) 2023-10-19 16:04:35 +02:00