mirror of
https://github.com/zylon-ai/private-gpt.git
synced 2025-12-22 07:40:12 +01:00
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
This commit is contained in:
parent
0d677e10b9
commit
6583dc84c0
2 changed files with 13 additions and 1 deletions
|
|
@ -111,7 +111,7 @@ with gr.Blocks(
|
|||
"}"
|
||||
".logo img { height: 25% }",
|
||||
) as blocks:
|
||||
with gr.Blocks(), gr.Row():
|
||||
with gr.Row():
|
||||
gr.HTML(f"<div class='logo'/><img src={logo_svg} alt=PrivateGPT></div")
|
||||
|
||||
with gr.Row():
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue