Spaces:
Paused
Paused
Commit ·
45a4784
1
Parent(s): 491b8c9
Swap demo to Track0000 — my own unfinished song from 2016
Browse filesReplace the placeholder demo clip with Track0000, the song I recorded in
2016 and never finished — the exact kind of clip CODA exists to finish, and
the emotional core of the project. Update the demo button + footer to tell
that story; remove the old placeholder. Bundled via Git LFS.
Files changed (2)
44 unmodified lines454647484950515253545556154 unmodified lines21121221321421521621753 unmodified lines271272273274275276277278279280281282283284285712 unmodified lines9989991000100110021003100452 unmodified lines1057105810591060106110621063106444 unmodified linesreturn fn if fn else (lambda f: f)spaces = _FakeSpaces()# bundled demo: a low-quality phone capture of an unfinished song by the band# PUSHBACK (shared via TikTok). lo-fi in, finished-sounding out.PUSHBACK_DEMO = os.path.join(os.path.dirname(__file__),"examples", "pushback_demo.mp3")PUSHBACK_CREDIT = ("Demo clip: **PUSHBACK** (via TikTok), used with thanks. ""Bring your own clip to finish your own song.")# total finished length. SA3 Small generates up to 120 s in one call, so this is# a *total length* control (clip + continuation), not a "seconds to add" knob.154 unmodified linesYields/returns 3-tuples for (output_audio, summary_md, stage_html)."""if not audio_path:raise gr.Error("Upload a clip (or load the PUSHBACK demo) first.")total_seconds = int(total_seconds)try:53 unmodified linesdef load_demo():"""Load the PUSHBACK demo clip into the uploader.Copy the bundled clip to a fresh temp file and hand THAT to the uploader.Gradio 6 refuses to move a non-user-uploaded bundled file into its cache("…was not uploaded by a user"), which broke the demo on the Space; a filein a per-request temp dir is one Gradio will cache and serve normally."""import shutildst = os.path.join(tempfile.mkdtemp(), os.path.basename(PUSHBACK_DEMO))shutil.copyfile(PUSHBACK_DEMO, dst)return dst712 unmodified lineswaveform_color="#33405e",waveform_progress_color="#6fe0f5",trim_region_color="#a98bff"))demo_btn = gr.Button("🎧 Try the demo — PUSHBACK (via TikTok)",size="sm", elem_classes="coda-demo")total_slider = gr.Slider(MIN_TOTAL, MAX_TOTAL, value=DEFAULT_TOTAL, step=1,52 unmodified linessummary_md = gr.Markdown(elem_classes="coda-summary")gr.HTML("<div id='coda-foot'>Demo clip: <strong>PUSHBACK</strong> (via TikTok), ""used with thanks. Bring your own clip to finish your own song.""<br/><span class='coda-badge'>Stable Audio 3 · ZeroGPU · 44.1 kHz ""stereo</span></div>")44 unmodified lines4546474849505152535455154 unmodified lines21021121221321421521653 unmodified lines270271272273274275276277278279280281282283284712 unmodified lines997998999100010011002100352 unmodified lines10561057105810591060106110621063106444 unmodified linesreturn fn if fn else (lambda f: f)spaces = _FakeSpaces()# bundled demo: "Track0000" — Tony Winslow's own song, recorded in 2016 and# never finished. The emotional core of CODA: the exact kind of clip this tool# exists to finish. lo-fi in, finished-sounding out.DEMO_CLIP = os.path.join(os.path.dirname(__file__),"examples", "track0000_tony_winslow.mp3")# total finished length. SA3 Small generates up to 120 s in one call, so this is# a *total length* control (clip + continuation), not a "seconds to add" knob.154 unmodified linesYields/returns 3-tuples for (output_audio, summary_md, stage_html)."""if not audio_path:raise gr.Error("Upload a clip (or load the Track0000 demo) first.")total_seconds = int(total_seconds)try:53 unmodified linesdef load_demo():"""Load the Track0000 demo clip into the uploader.Copy the bundled clip to a fresh temp file and hand THAT to the uploader.Gradio 6 refuses to move a non-user-uploaded bundled file into its cache("…was not uploaded by a user"), which broke the demo on the Space; a filein a per-request temp dir is one Gradio will cache and serve normally."""import shutildst = os.path.join(tempfile.mkdtemp(), os.path.basename(DEMO_CLIP))shutil.copyfile(DEMO_CLIP, dst)return dst712 unmodified lineswaveform_color="#33405e",waveform_progress_color="#6fe0f5",trim_region_color="#a98bff"))demo_btn = gr.Button("🎧 Hear Track0000 — recorded 2016, never finished",size="sm", elem_classes="coda-demo")total_slider = gr.Slider(MIN_TOTAL, MAX_TOTAL, value=DEFAULT_TOTAL, step=1,52 unmodified linessummary_md = gr.Markdown(elem_classes="coda-summary")gr.HTML("<div id='coda-foot'>Demo clip: <strong>Track0000</strong> — recorded ""2016, never finished. Tony Winslow's own unfinished song, the kind CODA ""exists to finish. Bring your own clip to finish yours.""<br/><span class='coda-badge'>Stable Audio 3 · ZeroGPU · 44.1 kHz ""stereo</span></div>")
123version https://git-lfs.github.com/spec/v1oid sha256:cf8ede66ebff48a629701519547b8931149321ba8521f63f86125b0259b20cc5size 473427123version https://git-lfs.github.com/spec/v1oid sha256:500c87290a8d20e67bdbdb37747327d04d331e80140633020ec1fa3e6d431c28size 413823
app.py+13-13
examples/pushback_demo.mp3 → examples/track0000_tony_winslow.mp3Renamed+2-2