@@ -6,6 +6,7 @@ import { AUDIO_SAMPLE_RATE } from "./lib/audio/constants";
66import { decodeAudioFile } from "./lib/audio/decode" ;
77import {
88 isModelFilename ,
9+ modelAssetUrl ,
910 requiredModelFiles ,
1011 type ModelArtifact ,
1112 type ModelFilename ,
@@ -373,16 +374,7 @@ export function App() {
373374 3. Add models
374375 </ h2 >
375376 < p className = "text-muted mb-5.5 leading-relaxed" >
376- Download model assets from the{ " " }
377- < a
378- className = "text-primary hover:text-accent font-semibold underline underline-offset-3"
379- href = "https://github.com/hi-ogawa/demucs-onnx/releases"
380- target = "_blank"
381- rel = "noreferrer"
382- >
383- GitHub Releases page
384- </ a >
385- , then select the required files.
377+ Download each required model, then select the downloaded file.
386378 </ p >
387379 < div className = "grid gap-2.5" >
388380 { requiredFiles . map ( ( filename ) => (
@@ -525,8 +517,8 @@ function ModelFileSlot({
525517} ) {
526518 return (
527519 < div data-testid = "model-file-slot" >
528- < label
529- className = { `flex min-h-13 cursor-pointer items-center gap-3 rounded-md border px-4 py-3 transition-colors ${
520+ < div
521+ className = { `flex min-h-13 items-center gap-3 rounded-md border px-4 py-3 transition-colors ${
530522 ready
531523 ? "border-success-border bg-success-surface hover:bg-success-surface-hover"
532524 : "border-border-strong bg-surface-muted hover:border-drop-border-hover hover:bg-drop-surface-hover border-dashed"
@@ -545,20 +537,26 @@ function ModelFileSlot({
545537 < code className = "text-foreground min-w-0 flex-1 overflow-hidden text-sm font-semibold text-ellipsis" >
546538 { filename }
547539 </ code >
548- < span className = "text-primary-strong shrink-0 text-sm font-bold" >
540+ < a
541+ className = "text-primary hover:text-accent shrink-0 text-sm font-semibold underline underline-offset-3"
542+ href = { modelAssetUrl ( filename ) }
543+ >
544+ Download
545+ </ a >
546+ < label className = "text-primary-strong shrink-0 cursor-pointer text-sm font-bold" >
549547 { ready ? "Ready" : "Choose file" }
550- </ span >
551- < input
552- className = "sr-only "
553- type = "file"
554- aria-label = { `Select ${ filename } ` }
555- accept = { filename . endsWith ( ".onnx" ) ? ".onnx" : ".bin" }
556- onChange = { ( event ) => {
557- onSelect ( [ ... ( event . target . files ?? [ ] ) ] ) ;
558- event . target . value = "" ;
559- } }
560- / >
561- </ label >
548+ < input
549+ className = "sr-only"
550+ type = "file "
551+ aria-label = { `Select ${ filename } ` }
552+ accept = { filename . endsWith ( ".onnx" ) ? ".onnx" : ".bin" }
553+ onChange = { ( event ) => {
554+ onSelect ( [ ... ( event . target . files ?? [ ] ) ] ) ;
555+ event . target . value = "" ;
556+ } }
557+ />
558+ </ label >
559+ </ div >
562560 { error && < p className = "text-danger mt-1.5 text-sm" > { error } </ p > }
563561 </ div >
564562 ) ;
0 commit comments