deps: migrate the UI to Gradio 6

Gradio was unpinned, so a fresh install pulled Gradio 6, where
gr.Audio no longer accepts show_download_button — the UI crashed on
startup with TypeError. Move forward to Gradio 6 instead of pinning
back to 5:

- requirements: gradio>=6.0.0
- drop the removed show_download_button kwarg (4 call sites)
- requirements: transformers>=4.57.0 — Gradio 6 requires
  huggingface-hub>=1.0, which transformers==4.50.0 forbids. Only
  UMT5EncoderModel and AutoTokenizer are used, so the bump is safe.

Verified: pip check clean, UI renders and server callbacks work on
gradio 6.26.0 / transformers 5.16.1 / huggingface-hub 1.30.0.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
Leonid Pershin
2026-09-08 18:38:12 +03:00
co-authored by Claude Opus 5
parent 911899635a
commit 6e3273d049
2 changed files with 3 additions and 6 deletions
+1 -4
View File
@@ -134,7 +134,7 @@ def create_text2music_ui(
) )
lora_weight = gr.Number(value=1.0, label="Lora weight", step=0.1, maximum=3, minimum=-3) lora_weight = gr.Number(value=1.0, label="Lora weight", step=0.1, maximum=3, minimum=-3)
ref_audio_input = gr.Audio(type="filepath", label="Reference Audio (for Audio2Audio)", visible=False, elem_id="ref_audio_input", show_download_button=True) ref_audio_input = gr.Audio(type="filepath", label="Reference Audio (for Audio2Audio)", visible=False, elem_id="ref_audio_input")
ref_audio_strength = gr.Slider( ref_audio_strength = gr.Slider(
label="Refer audio strength", label="Refer audio strength",
minimum=0.0, minimum=0.0,
@@ -403,7 +403,6 @@ def create_text2music_ui(
type="filepath", type="filepath",
visible=False, visible=False,
elem_id="repaint_source_audio_upload", elem_id="repaint_source_audio_upload",
show_download_button=True,
) )
repaint_source.change( repaint_source.change(
fn=lambda x: gr.update( fn=lambda x: gr.update(
@@ -572,7 +571,6 @@ def create_text2music_ui(
type="filepath", type="filepath",
visible=False, visible=False,
elem_id="edit_source_audio_upload", elem_id="edit_source_audio_upload",
show_download_button=True,
) )
edit_source.change( edit_source.change(
fn=lambda x: gr.update( fn=lambda x: gr.update(
@@ -724,7 +722,6 @@ def create_text2music_ui(
type="filepath", type="filepath",
visible=False, visible=False,
elem_id="extend_source_audio_upload", elem_id="extend_source_audio_upload",
show_download_button=True,
) )
extend_source.change( extend_source.change(
fn=lambda x: gr.update( fn=lambda x: gr.update(
+2 -2
View File
@@ -1,6 +1,6 @@
datasets==3.4.1 datasets==3.4.1
diffusers>=0.33.0 diffusers>=0.33.0
gradio gradio>=6.0.0
librosa==0.11.0 librosa==0.11.0
loguru==0.7.3 loguru==0.7.3
matplotlib==3.10.1 matplotlib==3.10.1
@@ -12,7 +12,7 @@ torch
torchaudio torchaudio
torchvision torchvision
tqdm tqdm
transformers==4.50.0 transformers>=4.57.0
py3langid==0.3.0 py3langid==0.3.0
hangul-romanize==0.1.0 hangul-romanize==0.1.0
num2words==0.5.14 num2words==0.5.14