Skip to content

Commit 8a19070

Browse files
committed
Downgrade to Gradio 5 (6 unstable)
- Sliders toggled via checkbox fail to render correctly on first activation; require unchecking and rechecking to display properly - Performance issues and possible other minor bugs we may not have caught yet Staying on Gradio 5 until Gradio 6 proves to be a viable option.
1 parent 0ff669c commit 8a19070

2 files changed

Lines changed: 37 additions & 9 deletions

File tree

app.py

Lines changed: 36 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,9 @@ def _ccl_patched(self, exc):
3838

3939
_pe._ProactorBasePipeTransport._call_connection_lost = _ccl_patched
4040

41+
# detect gradio
42+
GRADIO_6 = int(gr.__version__.split('.')[0]) >= 6
43+
4144
# Zluda hijack
4245
import rvc.lib.zluda
4346

@@ -89,6 +92,25 @@ def _ccl_patched(self, exc):
8992
# Define Gradio interface
9093
with gr.Blocks(
9194
title="Applio",
95+
**(
96+
{
97+
"theme": my_applio,
98+
"css": "footer{display:none !important}",
99+
"js": (
100+
(
101+
"() => {\n"
102+
+ pathlib.Path(
103+
os.path.join(now_dir, "tabs", "realtime", "main.js")
104+
).read_text()
105+
+ "\n}"
106+
)
107+
if client_mode
108+
else None
109+
),
110+
}
111+
if not GRADIO_6
112+
else {}
113+
),
92114
) as Applio:
93115
gr.Markdown("# Applio")
94116
gr.Markdown(
@@ -146,14 +168,20 @@ def launch_gradio(server_name: str, server_port: int) -> None:
146168
server_name=server_name,
147169
server_port=server_port,
148170
prevent_thread_lock=client_mode,
149-
theme=my_applio,
150-
css="footer{display:none !important}",
151-
js=(
152-
pathlib.Path(
153-
os.path.join(now_dir, "tabs", "realtime", "main.js")
154-
).read_text()
155-
if client_mode
156-
else None
171+
**(
172+
{
173+
"theme": my_applio,
174+
"css": "footer{display:none !important}",
175+
"js": (
176+
pathlib.Path(
177+
os.path.join(now_dir, "tabs", "realtime", "main.js")
178+
).read_text()
179+
if client_mode
180+
else None
181+
),
182+
}
183+
if GRADIO_6
184+
else {}
157185
),
158186
)
159187

requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ transformers==5.4.0
3636
# Visualization and UI
3737
matplotlib==3.10.8
3838
tensorboard
39-
gradio==6.10.0
39+
gradio==5.50.0
4040

4141
# Miscellaneous utilities
4242
certifi>=2026.2.25; sys_platform == 'darwin'

0 commit comments

Comments
 (0)