create_text2music_ui() sorted the saved *_input_params.json files with
int(name.split('_')[1]), which assumes the generated
output_<timestamp>_<idx>_ shape. Output names are user-controlled — via
infer.py --output_path or a save_path from the UI — so any other name
raised ValueError while the Blocks were being built and took the whole
interface down before it could start:
ValueError: invalid literal for int() with base 10: 'base'
Sort by mtime instead. That is what "previous generated input params"
means anyway (newest first) and it works for any filename; a file that
disappears between listdir() and getmtime() sorts last rather than
raising.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
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>