Skip to content

Commit 6f29730

Browse files
committed
Disable analytics before gradio Blocks
1 parent e3cf31d commit 6f29730

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

oracle/gradio/__init__.py

+3
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@
77
read from its OpenAPI schema.
88
"""
99

10+
import os
11+
1012
import gradio as gr
1113

1214
from .api import Oracle
@@ -15,6 +17,7 @@
1517
from .theme import theme, css, note, fold
1618

1719

20+
os.environ["GRADIO_ANALYTICS_ENABLED"] = "False"
1821
on.default['queue'] = False
1922

2023
with gr.Blocks(title='Oracle', theme=theme, css=css) as demo:

oracle/gradio/__main__.py

-3
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,10 @@
22
Configure and start the gradio server.
33
"""
44

5-
import os
6-
75
from . import demo
86
from .session import open_registration
97

108

11-
os.environ["GRADIO_ANALYTICS_ENABLED"] = "False"
129
demo.launch(
1310
server_port=8080,
1411
server_name='0.0.0.0',

0 commit comments

Comments
 (0)