Spaces:
Running
on
Zero
Running
on
Zero
zhzluke96
commited on
Commit
•
a2483ba
1
Parent(s):
c788835
update
Browse files
webui.py
CHANGED
@@ -17,6 +17,7 @@ from launch import (
|
|
17 |
app_version,
|
18 |
)
|
19 |
from modules.webui import webui_config
|
|
|
20 |
from modules.webui.app import webui_init, create_interface
|
21 |
import argparse
|
22 |
from modules.gradio_dcls_fix import dcls_patch
|
@@ -106,17 +107,16 @@ def process_webui_args(args):
|
|
106 |
"title": app_title,
|
107 |
"description": app_description,
|
108 |
"version": app_version,
|
109 |
-
|
110 |
-
|
111 |
-
|
112 |
-
|
113 |
-
|
114 |
-
|
115 |
-
|
116 |
-
|
117 |
-
|
118 |
-
|
119 |
-
"docs_url": "/docs",
|
120 |
},
|
121 |
)
|
122 |
# gradio uses a very open CORS policy via app.user_middleware, which makes it possible for
|
|
|
17 |
app_version,
|
18 |
)
|
19 |
from modules.webui import webui_config
|
20 |
+
from modules import config
|
21 |
from modules.webui.app import webui_init, create_interface
|
22 |
import argparse
|
23 |
from modules.gradio_dcls_fix import dcls_patch
|
|
|
107 |
"title": app_title,
|
108 |
"description": app_description,
|
109 |
"version": app_version,
|
110 |
+
"redoc_url": (
|
111 |
+
None
|
112 |
+
if api is False
|
113 |
+
else None if config.runtime_env_vars.no_docs else "/redoc"
|
114 |
+
),
|
115 |
+
"docs_url": (
|
116 |
+
None
|
117 |
+
if api is False
|
118 |
+
else None if config.runtime_env_vars.no_docs else "/docs"
|
119 |
+
),
|
|
|
120 |
},
|
121 |
)
|
122 |
# gradio uses a very open CORS policy via app.user_middleware, which makes it possible for
|