Skip to content

Commit c9d7a3d

Browse files
Update packages/tasks/src/model-libraries-snippets.ts
Co-authored-by: Lucain <lucain@huggingface.co>
1 parent bbc6f69 commit c9d7a3d

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

packages/tasks/src/model-libraries-snippets.ts

+5-4
Original file line numberDiff line numberDiff line change
@@ -425,10 +425,11 @@ model = GLiNER.from_pretrained("${model.id}")`,
425425
];
426426

427427
export const indextts = (model: ModelData): string[] => [
428-
`# Download model files from ${model.id} into a 'checkpoints' directory
429-
# e.g., using: huggingface-cli download ${model.id} \
430-
bigvgan_discriminator.pth bigvgan_generator.pth bpe.model dvae.pth gpt.pth unigram_12000.vocab \
431-
--local-dir checkpoints
428+
`# Download model
429+
from huggingface_hub import snapshot_download
430+
431+
snapshot_download(${model.id}, local_dir="checkpoints")
432+
432433
from indextts.infer import IndexTTS
433434
434435
# Ensure config.yaml is present in the checkpoints directory

0 commit comments

Comments
 (0)