@huggingface/tasks 0.13.0 → 0.13.1-test
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/commonjs/dataset-libraries.js +65 -0
- package/dist/commonjs/default-widget-inputs.d.ts +6 -0
- package/dist/commonjs/default-widget-inputs.d.ts.map +1 -0
- package/dist/commonjs/default-widget-inputs.js +698 -0
- package/dist/commonjs/gguf.js +43 -0
- package/dist/commonjs/hardware.js +461 -0
- package/dist/commonjs/index.d.ts +21 -0
- package/dist/commonjs/index.d.ts.map +1 -0
- package/dist/commonjs/index.js +57 -0
- package/dist/commonjs/library-to-tasks.d.ts +11 -0
- package/dist/commonjs/library-to-tasks.d.ts.map +1 -0
- package/dist/commonjs/library-to-tasks.js +76 -0
- package/dist/commonjs/local-apps.d.ts +195 -0
- package/dist/commonjs/local-apps.d.ts.map +1 -0
- package/dist/commonjs/local-apps.js +334 -0
- package/dist/commonjs/model-data.d.ts +146 -0
- package/dist/commonjs/model-data.d.ts.map +1 -0
- package/dist/commonjs/model-data.js +2 -0
- package/dist/commonjs/model-libraries-downloads.js +18 -0
- package/dist/commonjs/model-libraries-snippets.d.ts +72 -0
- package/dist/commonjs/model-libraries-snippets.d.ts.map +1 -0
- package/dist/commonjs/model-libraries-snippets.js +1093 -0
- package/dist/commonjs/model-libraries.d.ts +804 -0
- package/dist/commonjs/model-libraries.d.ts.map +1 -0
- package/dist/commonjs/model-libraries.js +793 -0
- package/dist/commonjs/package.json +3 -0
- package/dist/commonjs/pipelines.d.ts +425 -0
- package/dist/commonjs/pipelines.d.ts.map +1 -0
- package/dist/commonjs/pipelines.js +645 -0
- package/dist/commonjs/snippets/common.d.ts +14 -0
- package/dist/commonjs/snippets/common.d.ts.map +1 -0
- package/dist/commonjs/snippets/common.js +23 -0
- package/dist/commonjs/snippets/curl.d.ts +17 -0
- package/dist/commonjs/snippets/curl.d.ts.map +1 -0
- package/dist/commonjs/snippets/curl.js +100 -0
- package/dist/commonjs/snippets/curl.spec.js +89 -0
- package/dist/commonjs/snippets/index.d.ts +7 -0
- package/dist/commonjs/snippets/index.d.ts.map +1 -0
- package/dist/commonjs/snippets/index.js +38 -0
- package/dist/commonjs/snippets/inputs.d.ts +4 -0
- package/dist/commonjs/snippets/inputs.d.ts.map +1 -0
- package/dist/commonjs/snippets/inputs.js +127 -0
- package/dist/commonjs/snippets/js.d.ts +19 -0
- package/dist/commonjs/snippets/js.d.ts.map +1 -0
- package/dist/commonjs/snippets/js.js +278 -0
- package/dist/commonjs/snippets/js.spec.js +141 -0
- package/dist/commonjs/snippets/python.d.ts +22 -0
- package/dist/commonjs/snippets/python.d.ts.map +1 -0
- package/dist/commonjs/snippets/python.js +293 -0
- package/dist/commonjs/snippets/python.spec.js +135 -0
- package/dist/commonjs/snippets/types.d.ts +12 -0
- package/dist/commonjs/snippets/types.d.ts.map +1 -0
- package/dist/commonjs/snippets/types.js +2 -0
- package/dist/commonjs/tasks/audio-classification/data.d.ts +4 -0
- package/dist/commonjs/tasks/audio-classification/data.d.ts.map +1 -0
- package/dist/commonjs/tasks/audio-classification/data.js +79 -0
- package/dist/commonjs/tasks/audio-classification/inference.js +2 -0
- package/dist/commonjs/tasks/audio-to-audio/data.d.ts +4 -0
- package/dist/commonjs/tasks/audio-to-audio/data.d.ts.map +1 -0
- package/dist/commonjs/tasks/audio-to-audio/data.js +66 -0
- package/dist/commonjs/tasks/automatic-speech-recognition/data.d.ts +4 -0
- package/dist/commonjs/tasks/automatic-speech-recognition/data.d.ts.map +1 -0
- package/dist/commonjs/tasks/automatic-speech-recognition/data.js +80 -0
- package/dist/commonjs/tasks/automatic-speech-recognition/inference.js +7 -0
- package/dist/commonjs/tasks/chat-completion/inference.js +7 -0
- package/dist/commonjs/tasks/depth-estimation/data.d.ts +4 -0
- package/dist/commonjs/tasks/depth-estimation/data.d.ts.map +1 -0
- package/dist/commonjs/tasks/depth-estimation/data.js +69 -0
- package/dist/commonjs/tasks/depth-estimation/inference.js +7 -0
- package/dist/commonjs/tasks/document-question-answering/data.d.ts +4 -0
- package/dist/commonjs/tasks/document-question-answering/data.d.ts.map +1 -0
- package/dist/commonjs/tasks/document-question-answering/data.js +80 -0
- package/dist/commonjs/tasks/document-question-answering/inference.js +2 -0
- package/dist/commonjs/tasks/feature-extraction/data.d.ts +4 -0
- package/dist/commonjs/tasks/feature-extraction/data.d.ts.map +1 -0
- package/dist/commonjs/tasks/feature-extraction/data.js +55 -0
- package/dist/commonjs/tasks/feature-extraction/inference.js +7 -0
- package/dist/commonjs/tasks/fill-mask/data.d.ts +4 -0
- package/dist/commonjs/tasks/fill-mask/data.d.ts.map +1 -0
- package/dist/commonjs/tasks/fill-mask/data.js +75 -0
- package/dist/commonjs/tasks/fill-mask/inference.js +2 -0
- package/dist/commonjs/tasks/image-classification/data.d.ts +4 -0
- package/dist/commonjs/tasks/image-classification/data.d.ts.map +1 -0
- package/dist/commonjs/tasks/image-classification/data.js +86 -0
- package/dist/commonjs/tasks/image-classification/inference.js +2 -0
- package/dist/commonjs/tasks/image-feature-extraction/data.d.ts +4 -0
- package/dist/commonjs/tasks/image-feature-extraction/data.d.ts.map +1 -0
- package/dist/commonjs/tasks/image-feature-extraction/data.js +57 -0
- package/dist/commonjs/tasks/image-segmentation/data.d.ts +4 -0
- package/dist/commonjs/tasks/image-segmentation/data.d.ts.map +1 -0
- package/dist/commonjs/tasks/image-segmentation/data.js +95 -0
- package/dist/commonjs/tasks/image-segmentation/inference.js +2 -0
- package/dist/commonjs/tasks/image-text-to-text/data.d.ts +4 -0
- package/dist/commonjs/tasks/image-text-to-text/data.d.ts.map +1 -0
- package/dist/commonjs/tasks/image-text-to-text/data.js +99 -0
- package/dist/commonjs/tasks/image-to-3d/data.d.ts +4 -0
- package/dist/commonjs/tasks/image-to-3d/data.d.ts.map +1 -0
- package/dist/commonjs/tasks/image-to-3d/data.js +74 -0
- package/dist/commonjs/tasks/image-to-image/data.d.ts +4 -0
- package/dist/commonjs/tasks/image-to-image/data.d.ts.map +1 -0
- package/dist/commonjs/tasks/image-to-image/data.js +95 -0
- package/dist/commonjs/tasks/image-to-image/inference.js +7 -0
- package/dist/commonjs/tasks/image-to-text/data.d.ts +4 -0
- package/dist/commonjs/tasks/image-to-text/data.d.ts.map +1 -0
- package/dist/commonjs/tasks/image-to-text/data.js +80 -0
- package/dist/commonjs/tasks/image-to-text/inference.js +7 -0
- package/dist/commonjs/tasks/index.d.ts +87 -0
- package/dist/commonjs/tasks/index.d.ts.map +1 -0
- package/dist/commonjs/tasks/index.js +183 -0
- package/dist/commonjs/tasks/keypoint-detection/data.d.ts +4 -0
- package/dist/commonjs/tasks/keypoint-detection/data.d.ts.map +1 -0
- package/dist/commonjs/tasks/keypoint-detection/data.js +49 -0
- package/dist/commonjs/tasks/mask-generation/data.d.ts +4 -0
- package/dist/commonjs/tasks/mask-generation/data.d.ts.map +1 -0
- package/dist/commonjs/tasks/mask-generation/data.js +52 -0
- package/dist/commonjs/tasks/object-detection/data.d.ts +4 -0
- package/dist/commonjs/tasks/object-detection/data.d.ts.map +1 -0
- package/dist/commonjs/tasks/object-detection/data.js +82 -0
- package/dist/commonjs/tasks/object-detection/inference.js +2 -0
- package/dist/commonjs/tasks/placeholder/data.d.ts +4 -0
- package/dist/commonjs/tasks/placeholder/data.d.ts.map +1 -0
- package/dist/commonjs/tasks/placeholder/data.js +20 -0
- package/dist/commonjs/tasks/question-answering/data.d.ts +4 -0
- package/dist/commonjs/tasks/question-answering/data.d.ts.map +1 -0
- package/dist/commonjs/tasks/question-answering/data.js +71 -0
- package/dist/commonjs/tasks/question-answering/inference.js +2 -0
- package/dist/commonjs/tasks/reinforcement-learning/data.d.ts +4 -0
- package/dist/commonjs/tasks/reinforcement-learning/data.d.ts.map +1 -0
- package/dist/commonjs/tasks/reinforcement-learning/data.js +69 -0
- package/dist/commonjs/tasks/sentence-similarity/data.d.ts +4 -0
- package/dist/commonjs/tasks/sentence-similarity/data.d.ts.map +1 -0
- package/dist/commonjs/tasks/sentence-similarity/data.js +95 -0
- package/dist/commonjs/tasks/sentence-similarity/inference.js +7 -0
- package/dist/commonjs/tasks/summarization/data.d.ts +4 -0
- package/dist/commonjs/tasks/summarization/data.d.ts.map +1 -0
- package/dist/commonjs/tasks/summarization/data.js +69 -0
- package/dist/commonjs/tasks/summarization/inference.js +7 -0
- package/dist/commonjs/tasks/table-question-answering/data.d.ts +4 -0
- package/dist/commonjs/tasks/table-question-answering/data.d.ts.map +1 -0
- package/dist/commonjs/tasks/table-question-answering/data.js +54 -0
- package/dist/commonjs/tasks/table-question-answering/inference.js +2 -0
- package/dist/commonjs/tasks/tabular-classification/data.d.ts +4 -0
- package/dist/commonjs/tasks/tabular-classification/data.d.ts.map +1 -0
- package/dist/commonjs/tasks/tabular-classification/data.js +67 -0
- package/dist/commonjs/tasks/tabular-regression/data.d.ts +4 -0
- package/dist/commonjs/tasks/tabular-regression/data.d.ts.map +1 -0
- package/dist/commonjs/tasks/tabular-regression/data.js +55 -0
- package/dist/commonjs/tasks/text-classification/data.d.ts +4 -0
- package/dist/commonjs/tasks/text-classification/data.d.ts.map +1 -0
- package/dist/commonjs/tasks/text-classification/data.js +100 -0
- package/dist/commonjs/tasks/text-classification/inference.js +2 -0
- package/dist/commonjs/tasks/text-generation/data.d.ts +4 -0
- package/dist/commonjs/tasks/text-generation/data.d.ts.map +1 -0
- package/dist/commonjs/tasks/text-generation/data.js +108 -0
- package/dist/commonjs/tasks/text-generation/inference.js +7 -0
- package/dist/commonjs/tasks/text-to-3d/data.d.ts +4 -0
- package/dist/commonjs/tasks/text-to-3d/data.d.ts.map +1 -0
- package/dist/commonjs/tasks/text-to-3d/data.js +55 -0
- package/dist/commonjs/tasks/text-to-audio/inference.js +7 -0
- package/dist/commonjs/tasks/text-to-image/data.d.ts +4 -0
- package/dist/commonjs/tasks/text-to-image/data.d.ts.map +1 -0
- package/dist/commonjs/tasks/text-to-image/data.js +95 -0
- package/dist/commonjs/tasks/text-to-image/inference.js +7 -0
- package/dist/commonjs/tasks/text-to-speech/data.d.ts +4 -0
- package/dist/commonjs/tasks/text-to-speech/data.d.ts.map +1 -0
- package/dist/commonjs/tasks/text-to-speech/data.js +76 -0
- package/dist/commonjs/tasks/text-to-speech/inference.js +7 -0
- package/dist/commonjs/tasks/text-to-video/data.d.ts +4 -0
- package/dist/commonjs/tasks/text-to-video/data.d.ts.map +1 -0
- package/dist/commonjs/tasks/text-to-video/data.js +95 -0
- package/dist/commonjs/tasks/text2text-generation/inference.js +7 -0
- package/dist/commonjs/tasks/token-classification/data.d.ts +4 -0
- package/dist/commonjs/tasks/token-classification/data.d.ts.map +1 -0
- package/dist/commonjs/tasks/token-classification/data.js +87 -0
- package/dist/commonjs/tasks/token-classification/inference.js +2 -0
- package/dist/commonjs/tasks/translation/data.d.ts +4 -0
- package/dist/commonjs/tasks/translation/data.d.ts.map +1 -0
- package/dist/commonjs/tasks/translation/data.js +65 -0
- package/dist/commonjs/tasks/translation/inference.js +7 -0
- package/dist/commonjs/tasks/unconditional-image-generation/data.d.ts +4 -0
- package/dist/commonjs/tasks/unconditional-image-generation/data.d.ts.map +1 -0
- package/dist/commonjs/tasks/unconditional-image-generation/data.js +65 -0
- package/dist/commonjs/tasks/video-classification/data.d.ts +4 -0
- package/dist/commonjs/tasks/video-classification/data.d.ts.map +1 -0
- package/dist/commonjs/tasks/video-classification/data.js +82 -0
- package/dist/commonjs/tasks/video-classification/inference.js +2 -0
- package/dist/commonjs/tasks/video-text-to-text/data.d.ts +4 -0
- package/dist/commonjs/tasks/video-text-to-text/data.d.ts.map +1 -0
- package/dist/commonjs/tasks/video-text-to-text/data.js +63 -0
- package/dist/commonjs/tasks/visual-question-answering/data.d.ts +4 -0
- package/dist/commonjs/tasks/visual-question-answering/data.d.ts.map +1 -0
- package/dist/commonjs/tasks/visual-question-answering/data.js +93 -0
- package/dist/commonjs/tasks/visual-question-answering/inference.js +2 -0
- package/dist/commonjs/tasks/zero-shot-classification/data.d.ts +4 -0
- package/dist/commonjs/tasks/zero-shot-classification/data.d.ts.map +1 -0
- package/dist/commonjs/tasks/zero-shot-classification/data.js +66 -0
- package/dist/commonjs/tasks/zero-shot-classification/inference.js +2 -0
- package/dist/commonjs/tasks/zero-shot-image-classification/data.d.ts +4 -0
- package/dist/commonjs/tasks/zero-shot-image-classification/data.d.ts.map +1 -0
- package/dist/commonjs/tasks/zero-shot-image-classification/data.js +81 -0
- package/dist/commonjs/tasks/zero-shot-image-classification/inference.js +2 -0
- package/dist/commonjs/tasks/zero-shot-object-detection/data.d.ts +4 -0
- package/dist/commonjs/tasks/zero-shot-object-detection/data.d.ts.map +1 -0
- package/dist/commonjs/tasks/zero-shot-object-detection/data.js +62 -0
- package/dist/commonjs/tasks/zero-shot-object-detection/inference.js +2 -0
- package/dist/commonjs/tokenizer-data.js +13 -0
- package/dist/commonjs/widget-example.d.ts +83 -0
- package/dist/commonjs/widget-example.d.ts.map +1 -0
- package/dist/commonjs/widget-example.js +5 -0
- package/dist/esm/dataset-libraries.d.ts +87 -0
- package/dist/esm/dataset-libraries.d.ts.map +1 -0
- package/dist/esm/dataset-libraries.js +62 -0
- package/dist/esm/default-widget-inputs.d.ts +6 -0
- package/dist/esm/default-widget-inputs.d.ts.map +1 -0
- package/dist/esm/default-widget-inputs.js +695 -0
- package/dist/esm/gguf.d.ts +35 -0
- package/dist/esm/gguf.d.ts.map +1 -0
- package/dist/esm/gguf.js +39 -0
- package/dist/esm/hardware.d.ts +478 -0
- package/dist/esm/hardware.d.ts.map +1 -0
- package/dist/esm/hardware.js +458 -0
- package/dist/esm/index.d.ts +21 -0
- package/dist/esm/index.d.ts.map +1 -0
- package/dist/esm/index.js +12 -0
- package/dist/esm/library-to-tasks.d.ts +11 -0
- package/dist/esm/library-to-tasks.d.ts.map +1 -0
- package/dist/esm/library-to-tasks.js +73 -0
- package/dist/esm/local-apps.d.ts +195 -0
- package/dist/esm/local-apps.d.ts.map +1 -0
- package/dist/esm/local-apps.js +331 -0
- package/dist/esm/model-data.d.ts +146 -0
- package/dist/esm/model-data.d.ts.map +1 -0
- package/dist/esm/model-data.js +1 -0
- package/dist/esm/model-libraries-downloads.d.ts +18 -0
- package/dist/esm/model-libraries-downloads.d.ts.map +1 -0
- package/dist/esm/model-libraries-downloads.js +17 -0
- package/dist/esm/model-libraries-snippets.d.ts +72 -0
- package/dist/esm/model-libraries-snippets.d.ts.map +1 -0
- package/dist/esm/model-libraries-snippets.js +1019 -0
- package/dist/esm/model-libraries.d.ts +804 -0
- package/dist/esm/model-libraries.d.ts.map +1 -0
- package/dist/esm/model-libraries.js +767 -0
- package/dist/esm/package.json +3 -0
- package/dist/esm/pipelines.d.ts +425 -0
- package/dist/esm/pipelines.d.ts.map +1 -0
- package/dist/esm/pipelines.js +642 -0
- package/dist/esm/snippets/common.d.ts +14 -0
- package/dist/esm/snippets/common.d.ts.map +1 -0
- package/dist/esm/snippets/common.js +19 -0
- package/dist/esm/snippets/curl.d.ts +17 -0
- package/dist/esm/snippets/curl.d.ts.map +1 -0
- package/dist/esm/snippets/curl.js +91 -0
- package/dist/esm/snippets/curl.spec.d.ts +2 -0
- package/dist/esm/snippets/curl.spec.d.ts.map +1 -0
- package/dist/esm/snippets/curl.spec.js +87 -0
- package/dist/esm/snippets/index.d.ts +7 -0
- package/dist/esm/snippets/index.d.ts.map +1 -0
- package/dist/esm/snippets/index.js +6 -0
- package/dist/esm/snippets/inputs.d.ts +4 -0
- package/dist/esm/snippets/inputs.d.ts.map +1 -0
- package/dist/esm/snippets/inputs.js +124 -0
- package/dist/esm/snippets/js.d.ts +19 -0
- package/dist/esm/snippets/js.d.ts.map +1 -0
- package/dist/esm/snippets/js.js +267 -0
- package/dist/esm/snippets/js.spec.d.ts +2 -0
- package/dist/esm/snippets/js.spec.d.ts.map +1 -0
- package/dist/esm/snippets/js.spec.js +139 -0
- package/dist/esm/snippets/python.d.ts +22 -0
- package/dist/esm/snippets/python.d.ts.map +1 -0
- package/dist/esm/snippets/python.js +279 -0
- package/dist/esm/snippets/python.spec.d.ts +2 -0
- package/dist/esm/snippets/python.spec.d.ts.map +1 -0
- package/dist/esm/snippets/python.spec.js +133 -0
- package/dist/esm/snippets/types.d.ts +12 -0
- package/dist/esm/snippets/types.d.ts.map +1 -0
- package/dist/esm/snippets/types.js +1 -0
- package/dist/esm/tasks/audio-classification/data.d.ts +4 -0
- package/dist/esm/tasks/audio-classification/data.d.ts.map +1 -0
- package/dist/esm/tasks/audio-classification/data.js +77 -0
- package/dist/esm/tasks/audio-classification/inference.d.ts +53 -0
- package/dist/esm/tasks/audio-classification/inference.d.ts.map +1 -0
- package/dist/esm/tasks/audio-classification/inference.js +1 -0
- package/dist/esm/tasks/audio-to-audio/data.d.ts +4 -0
- package/dist/esm/tasks/audio-to-audio/data.d.ts.map +1 -0
- package/dist/esm/tasks/audio-to-audio/data.js +64 -0
- package/dist/esm/tasks/automatic-speech-recognition/data.d.ts +4 -0
- package/dist/esm/tasks/automatic-speech-recognition/data.d.ts.map +1 -0
- package/dist/esm/tasks/automatic-speech-recognition/data.js +78 -0
- package/dist/esm/tasks/automatic-speech-recognition/inference.d.ts +155 -0
- package/dist/esm/tasks/automatic-speech-recognition/inference.d.ts.map +1 -0
- package/dist/esm/tasks/automatic-speech-recognition/inference.js +6 -0
- package/dist/esm/tasks/chat-completion/inference.d.ts +291 -0
- package/dist/esm/tasks/chat-completion/inference.d.ts.map +1 -0
- package/dist/esm/tasks/chat-completion/inference.js +6 -0
- package/dist/esm/tasks/depth-estimation/data.d.ts +4 -0
- package/dist/esm/tasks/depth-estimation/data.d.ts.map +1 -0
- package/dist/esm/tasks/depth-estimation/data.js +67 -0
- package/dist/esm/tasks/depth-estimation/inference.d.ts +36 -0
- package/dist/esm/tasks/depth-estimation/inference.d.ts.map +1 -0
- package/dist/esm/tasks/depth-estimation/inference.js +6 -0
- package/dist/esm/tasks/document-question-answering/data.d.ts +4 -0
- package/dist/esm/tasks/document-question-answering/data.d.ts.map +1 -0
- package/dist/esm/tasks/document-question-answering/data.js +78 -0
- package/dist/esm/tasks/document-question-answering/inference.d.ts +111 -0
- package/dist/esm/tasks/document-question-answering/inference.d.ts.map +1 -0
- package/dist/esm/tasks/document-question-answering/inference.js +1 -0
- package/dist/esm/tasks/feature-extraction/data.d.ts +4 -0
- package/dist/esm/tasks/feature-extraction/data.d.ts.map +1 -0
- package/dist/esm/tasks/feature-extraction/data.js +53 -0
- package/dist/esm/tasks/feature-extraction/inference.d.ts +38 -0
- package/dist/esm/tasks/feature-extraction/inference.d.ts.map +1 -0
- package/dist/esm/tasks/feature-extraction/inference.js +6 -0
- package/dist/esm/tasks/fill-mask/data.d.ts +4 -0
- package/dist/esm/tasks/fill-mask/data.d.ts.map +1 -0
- package/dist/esm/tasks/fill-mask/data.js +73 -0
- package/dist/esm/tasks/fill-mask/inference.d.ts +63 -0
- package/dist/esm/tasks/fill-mask/inference.d.ts.map +1 -0
- package/dist/esm/tasks/fill-mask/inference.js +1 -0
- package/dist/esm/tasks/image-classification/data.d.ts +4 -0
- package/dist/esm/tasks/image-classification/data.d.ts.map +1 -0
- package/dist/esm/tasks/image-classification/data.js +84 -0
- package/dist/esm/tasks/image-classification/inference.d.ts +53 -0
- package/dist/esm/tasks/image-classification/inference.d.ts.map +1 -0
- package/dist/esm/tasks/image-classification/inference.js +1 -0
- package/dist/esm/tasks/image-feature-extraction/data.d.ts +4 -0
- package/dist/esm/tasks/image-feature-extraction/data.d.ts.map +1 -0
- package/dist/esm/tasks/image-feature-extraction/data.js +55 -0
- package/dist/esm/tasks/image-segmentation/data.d.ts +4 -0
- package/dist/esm/tasks/image-segmentation/data.d.ts.map +1 -0
- package/dist/esm/tasks/image-segmentation/data.js +93 -0
- package/dist/esm/tasks/image-segmentation/inference.d.ts +70 -0
- package/dist/esm/tasks/image-segmentation/inference.d.ts.map +1 -0
- package/dist/esm/tasks/image-segmentation/inference.js +1 -0
- package/dist/esm/tasks/image-text-to-text/data.d.ts +4 -0
- package/dist/esm/tasks/image-text-to-text/data.d.ts.map +1 -0
- package/dist/esm/tasks/image-text-to-text/data.js +97 -0
- package/dist/esm/tasks/image-to-3d/data.d.ts +4 -0
- package/dist/esm/tasks/image-to-3d/data.d.ts.map +1 -0
- package/dist/esm/tasks/image-to-3d/data.js +72 -0
- package/dist/esm/tasks/image-to-image/data.d.ts +4 -0
- package/dist/esm/tasks/image-to-image/data.d.ts.map +1 -0
- package/dist/esm/tasks/image-to-image/data.js +93 -0
- package/dist/esm/tasks/image-to-image/inference.d.ts +65 -0
- package/dist/esm/tasks/image-to-image/inference.d.ts.map +1 -0
- package/dist/esm/tasks/image-to-image/inference.js +6 -0
- package/dist/esm/tasks/image-to-text/data.d.ts +4 -0
- package/dist/esm/tasks/image-to-text/data.d.ts.map +1 -0
- package/dist/esm/tasks/image-to-text/data.js +78 -0
- package/dist/esm/tasks/image-to-text/inference.d.ts +139 -0
- package/dist/esm/tasks/image-to-text/inference.d.ts.map +1 -0
- package/dist/esm/tasks/image-to-text/inference.js +6 -0
- package/dist/esm/tasks/index.d.ts +87 -0
- package/dist/esm/tasks/index.d.ts.map +1 -0
- package/dist/esm/tasks/index.js +177 -0
- package/dist/esm/tasks/keypoint-detection/data.d.ts +4 -0
- package/dist/esm/tasks/keypoint-detection/data.d.ts.map +1 -0
- package/dist/esm/tasks/keypoint-detection/data.js +47 -0
- package/dist/esm/tasks/mask-generation/data.d.ts +4 -0
- package/dist/esm/tasks/mask-generation/data.d.ts.map +1 -0
- package/dist/esm/tasks/mask-generation/data.js +50 -0
- package/dist/esm/tasks/object-detection/data.d.ts +4 -0
- package/dist/esm/tasks/object-detection/data.d.ts.map +1 -0
- package/dist/esm/tasks/object-detection/data.js +80 -0
- package/dist/esm/tasks/object-detection/inference.d.ts +76 -0
- package/dist/esm/tasks/object-detection/inference.d.ts.map +1 -0
- package/dist/esm/tasks/object-detection/inference.js +1 -0
- package/dist/esm/tasks/placeholder/data.d.ts +4 -0
- package/dist/esm/tasks/placeholder/data.d.ts.map +1 -0
- package/dist/esm/tasks/placeholder/data.js +18 -0
- package/dist/esm/tasks/question-answering/data.d.ts +4 -0
- package/dist/esm/tasks/question-answering/data.d.ts.map +1 -0
- package/dist/esm/tasks/question-answering/data.js +69 -0
- package/dist/esm/tasks/question-answering/inference.d.ts +100 -0
- package/dist/esm/tasks/question-answering/inference.d.ts.map +1 -0
- package/dist/esm/tasks/question-answering/inference.js +1 -0
- package/dist/esm/tasks/reinforcement-learning/data.d.ts +4 -0
- package/dist/esm/tasks/reinforcement-learning/data.d.ts.map +1 -0
- package/dist/esm/tasks/reinforcement-learning/data.js +67 -0
- package/dist/esm/tasks/sentence-similarity/data.d.ts +4 -0
- package/dist/esm/tasks/sentence-similarity/data.d.ts.map +1 -0
- package/dist/esm/tasks/sentence-similarity/data.js +93 -0
- package/dist/esm/tasks/sentence-similarity/inference.d.ts +32 -0
- package/dist/esm/tasks/sentence-similarity/inference.d.ts.map +1 -0
- package/dist/esm/tasks/sentence-similarity/inference.js +6 -0
- package/dist/esm/tasks/summarization/data.d.ts +4 -0
- package/dist/esm/tasks/summarization/data.d.ts.map +1 -0
- package/dist/esm/tasks/summarization/data.js +67 -0
- package/dist/esm/tasks/summarization/inference.d.ts +56 -0
- package/dist/esm/tasks/summarization/inference.d.ts.map +1 -0
- package/dist/esm/tasks/summarization/inference.js +6 -0
- package/dist/esm/tasks/table-question-answering/data.d.ts +4 -0
- package/dist/esm/tasks/table-question-answering/data.d.ts.map +1 -0
- package/dist/esm/tasks/table-question-answering/data.js +52 -0
- package/dist/esm/tasks/table-question-answering/inference.d.ts +62 -0
- package/dist/esm/tasks/table-question-answering/inference.d.ts.map +1 -0
- package/dist/esm/tasks/table-question-answering/inference.js +1 -0
- package/dist/esm/tasks/tabular-classification/data.d.ts +4 -0
- package/dist/esm/tasks/tabular-classification/data.d.ts.map +1 -0
- package/dist/esm/tasks/tabular-classification/data.js +65 -0
- package/dist/esm/tasks/tabular-regression/data.d.ts +4 -0
- package/dist/esm/tasks/tabular-regression/data.d.ts.map +1 -0
- package/dist/esm/tasks/tabular-regression/data.js +53 -0
- package/dist/esm/tasks/text-classification/data.d.ts +4 -0
- package/dist/esm/tasks/text-classification/data.d.ts.map +1 -0
- package/dist/esm/tasks/text-classification/data.js +98 -0
- package/dist/esm/tasks/text-classification/inference.d.ts +52 -0
- package/dist/esm/tasks/text-classification/inference.d.ts.map +1 -0
- package/dist/esm/tasks/text-classification/inference.js +1 -0
- package/dist/esm/tasks/text-generation/data.d.ts +4 -0
- package/dist/esm/tasks/text-generation/data.d.ts.map +1 -0
- package/dist/esm/tasks/text-generation/data.js +106 -0
- package/dist/esm/tasks/text-generation/inference.d.ts +188 -0
- package/dist/esm/tasks/text-generation/inference.d.ts.map +1 -0
- package/dist/esm/tasks/text-generation/inference.js +6 -0
- package/dist/esm/tasks/text-to-3d/data.d.ts +4 -0
- package/dist/esm/tasks/text-to-3d/data.d.ts.map +1 -0
- package/dist/esm/tasks/text-to-3d/data.js +53 -0
- package/dist/esm/tasks/text-to-audio/inference.d.ts +139 -0
- package/dist/esm/tasks/text-to-audio/inference.d.ts.map +1 -0
- package/dist/esm/tasks/text-to-audio/inference.js +6 -0
- package/dist/esm/tasks/text-to-image/data.d.ts +4 -0
- package/dist/esm/tasks/text-to-image/data.d.ts.map +1 -0
- package/dist/esm/tasks/text-to-image/data.js +93 -0
- package/dist/esm/tasks/text-to-image/inference.d.ts +72 -0
- package/dist/esm/tasks/text-to-image/inference.d.ts.map +1 -0
- package/dist/esm/tasks/text-to-image/inference.js +6 -0
- package/dist/esm/tasks/text-to-speech/data.d.ts +4 -0
- package/dist/esm/tasks/text-to-speech/data.d.ts.map +1 -0
- package/dist/esm/tasks/text-to-speech/data.js +74 -0
- package/dist/esm/tasks/text-to-speech/inference.d.ts +141 -0
- package/dist/esm/tasks/text-to-speech/inference.d.ts.map +1 -0
- package/dist/esm/tasks/text-to-speech/inference.js +6 -0
- package/dist/esm/tasks/text-to-video/data.d.ts +4 -0
- package/dist/esm/tasks/text-to-video/data.d.ts.map +1 -0
- package/dist/esm/tasks/text-to-video/data.js +93 -0
- package/dist/esm/tasks/text2text-generation/inference.d.ts +54 -0
- package/dist/esm/tasks/text2text-generation/inference.d.ts.map +1 -0
- package/dist/esm/tasks/text2text-generation/inference.js +6 -0
- package/dist/esm/tasks/token-classification/data.d.ts +4 -0
- package/dist/esm/tasks/token-classification/data.d.ts.map +1 -0
- package/dist/esm/tasks/token-classification/data.js +85 -0
- package/dist/esm/tasks/token-classification/inference.d.ts +86 -0
- package/dist/esm/tasks/token-classification/inference.d.ts.map +1 -0
- package/dist/esm/tasks/token-classification/inference.js +1 -0
- package/dist/esm/tasks/translation/data.d.ts +4 -0
- package/dist/esm/tasks/translation/data.d.ts.map +1 -0
- package/dist/esm/tasks/translation/data.js +63 -0
- package/dist/esm/tasks/translation/inference.d.ts +66 -0
- package/dist/esm/tasks/translation/inference.d.ts.map +1 -0
- package/dist/esm/tasks/translation/inference.js +6 -0
- package/dist/esm/tasks/unconditional-image-generation/data.d.ts +4 -0
- package/dist/esm/tasks/unconditional-image-generation/data.d.ts.map +1 -0
- package/dist/esm/tasks/unconditional-image-generation/data.js +63 -0
- package/dist/esm/tasks/video-classification/data.d.ts +4 -0
- package/dist/esm/tasks/video-classification/data.d.ts.map +1 -0
- package/dist/esm/tasks/video-classification/data.js +80 -0
- package/dist/esm/tasks/video-classification/inference.d.ts +60 -0
- package/dist/esm/tasks/video-classification/inference.d.ts.map +1 -0
- package/dist/esm/tasks/video-classification/inference.js +1 -0
- package/dist/esm/tasks/video-text-to-text/data.d.ts +4 -0
- package/dist/esm/tasks/video-text-to-text/data.d.ts.map +1 -0
- package/dist/esm/tasks/video-text-to-text/data.js +61 -0
- package/dist/esm/tasks/visual-question-answering/data.d.ts +4 -0
- package/dist/esm/tasks/visual-question-answering/data.d.ts.map +1 -0
- package/dist/esm/tasks/visual-question-answering/data.js +91 -0
- package/dist/esm/tasks/visual-question-answering/inference.d.ts +63 -0
- package/dist/esm/tasks/visual-question-answering/inference.d.ts.map +1 -0
- package/dist/esm/tasks/visual-question-answering/inference.js +1 -0
- package/dist/esm/tasks/zero-shot-classification/data.d.ts +4 -0
- package/dist/esm/tasks/zero-shot-classification/data.d.ts.map +1 -0
- package/dist/esm/tasks/zero-shot-classification/data.js +64 -0
- package/dist/esm/tasks/zero-shot-classification/inference.d.ts +68 -0
- package/dist/esm/tasks/zero-shot-classification/inference.d.ts.map +1 -0
- package/dist/esm/tasks/zero-shot-classification/inference.js +1 -0
- package/dist/esm/tasks/zero-shot-image-classification/data.d.ts +4 -0
- package/dist/esm/tasks/zero-shot-image-classification/data.d.ts.map +1 -0
- package/dist/esm/tasks/zero-shot-image-classification/data.js +79 -0
- package/dist/esm/tasks/zero-shot-image-classification/inference.d.ts +62 -0
- package/dist/esm/tasks/zero-shot-image-classification/inference.d.ts.map +1 -0
- package/dist/esm/tasks/zero-shot-image-classification/inference.js +1 -0
- package/dist/esm/tasks/zero-shot-object-detection/data.d.ts +4 -0
- package/dist/esm/tasks/zero-shot-object-detection/data.d.ts.map +1 -0
- package/dist/esm/tasks/zero-shot-object-detection/data.js +60 -0
- package/dist/esm/tasks/zero-shot-object-detection/inference.d.ts +67 -0
- package/dist/esm/tasks/zero-shot-object-detection/inference.d.ts.map +1 -0
- package/dist/esm/tasks/zero-shot-object-detection/inference.js +1 -0
- package/dist/esm/tokenizer-data.d.ts +26 -0
- package/dist/esm/tokenizer-data.d.ts.map +1 -0
- package/dist/esm/tokenizer-data.js +10 -0
- package/dist/esm/widget-example.d.ts +83 -0
- package/dist/esm/widget-example.d.ts.map +1 -0
- package/dist/esm/widget-example.js +4 -0
- package/package.json +24 -23
- package/dist/index.cjs +0 -7976
- package/dist/index.js +0 -7933
- package/dist/scripts/inference-codegen.d.ts +0 -2
- package/dist/scripts/inference-codegen.d.ts.map +0 -1
- package/dist/scripts/inference-tei-import.d.ts +0 -2
- package/dist/scripts/inference-tei-import.d.ts.map +0 -1
- package/dist/scripts/inference-tgi-import.d.ts +0 -2
- package/dist/scripts/inference-tgi-import.d.ts.map +0 -1
- package/dist/src/default-widget-inputs.d.ts +0 -6
- package/dist/src/default-widget-inputs.d.ts.map +0 -1
- package/dist/src/index.d.ts +0 -21
- package/dist/src/index.d.ts.map +0 -1
- package/dist/src/library-to-tasks.d.ts +0 -11
- package/dist/src/library-to-tasks.d.ts.map +0 -1
- package/dist/src/local-apps.d.ts +0 -195
- package/dist/src/local-apps.d.ts.map +0 -1
- package/dist/src/model-data.d.ts +0 -146
- package/dist/src/model-data.d.ts.map +0 -1
- package/dist/src/model-libraries-snippets.d.ts +0 -72
- package/dist/src/model-libraries-snippets.d.ts.map +0 -1
- package/dist/src/model-libraries.d.ts +0 -804
- package/dist/src/model-libraries.d.ts.map +0 -1
- package/dist/src/pipelines.d.ts +0 -425
- package/dist/src/pipelines.d.ts.map +0 -1
- package/dist/src/snippets/common.d.ts +0 -14
- package/dist/src/snippets/common.d.ts.map +0 -1
- package/dist/src/snippets/curl.d.ts +0 -17
- package/dist/src/snippets/curl.d.ts.map +0 -1
- package/dist/src/snippets/index.d.ts +0 -6
- package/dist/src/snippets/index.d.ts.map +0 -1
- package/dist/src/snippets/inputs.d.ts +0 -4
- package/dist/src/snippets/inputs.d.ts.map +0 -1
- package/dist/src/snippets/js.d.ts +0 -19
- package/dist/src/snippets/js.d.ts.map +0 -1
- package/dist/src/snippets/python.d.ts +0 -22
- package/dist/src/snippets/python.d.ts.map +0 -1
- package/dist/src/snippets/types.d.ts +0 -12
- package/dist/src/snippets/types.d.ts.map +0 -1
- package/dist/src/tasks/audio-classification/data.d.ts +0 -4
- package/dist/src/tasks/audio-classification/data.d.ts.map +0 -1
- package/dist/src/tasks/audio-to-audio/data.d.ts +0 -4
- package/dist/src/tasks/audio-to-audio/data.d.ts.map +0 -1
- package/dist/src/tasks/automatic-speech-recognition/data.d.ts +0 -4
- package/dist/src/tasks/automatic-speech-recognition/data.d.ts.map +0 -1
- package/dist/src/tasks/depth-estimation/data.d.ts +0 -4
- package/dist/src/tasks/depth-estimation/data.d.ts.map +0 -1
- package/dist/src/tasks/document-question-answering/data.d.ts +0 -4
- package/dist/src/tasks/document-question-answering/data.d.ts.map +0 -1
- package/dist/src/tasks/feature-extraction/data.d.ts +0 -4
- package/dist/src/tasks/feature-extraction/data.d.ts.map +0 -1
- package/dist/src/tasks/fill-mask/data.d.ts +0 -4
- package/dist/src/tasks/fill-mask/data.d.ts.map +0 -1
- package/dist/src/tasks/image-classification/data.d.ts +0 -4
- package/dist/src/tasks/image-classification/data.d.ts.map +0 -1
- package/dist/src/tasks/image-feature-extraction/data.d.ts +0 -4
- package/dist/src/tasks/image-feature-extraction/data.d.ts.map +0 -1
- package/dist/src/tasks/image-segmentation/data.d.ts +0 -4
- package/dist/src/tasks/image-segmentation/data.d.ts.map +0 -1
- package/dist/src/tasks/image-text-to-text/data.d.ts +0 -4
- package/dist/src/tasks/image-text-to-text/data.d.ts.map +0 -1
- package/dist/src/tasks/image-to-3d/data.d.ts +0 -4
- package/dist/src/tasks/image-to-3d/data.d.ts.map +0 -1
- package/dist/src/tasks/image-to-image/data.d.ts +0 -4
- package/dist/src/tasks/image-to-image/data.d.ts.map +0 -1
- package/dist/src/tasks/image-to-text/data.d.ts +0 -4
- package/dist/src/tasks/image-to-text/data.d.ts.map +0 -1
- package/dist/src/tasks/index.d.ts +0 -87
- package/dist/src/tasks/index.d.ts.map +0 -1
- package/dist/src/tasks/keypoint-detection/data.d.ts +0 -4
- package/dist/src/tasks/keypoint-detection/data.d.ts.map +0 -1
- package/dist/src/tasks/mask-generation/data.d.ts +0 -4
- package/dist/src/tasks/mask-generation/data.d.ts.map +0 -1
- package/dist/src/tasks/object-detection/data.d.ts +0 -4
- package/dist/src/tasks/object-detection/data.d.ts.map +0 -1
- package/dist/src/tasks/placeholder/data.d.ts +0 -4
- package/dist/src/tasks/placeholder/data.d.ts.map +0 -1
- package/dist/src/tasks/question-answering/data.d.ts +0 -4
- package/dist/src/tasks/question-answering/data.d.ts.map +0 -1
- package/dist/src/tasks/reinforcement-learning/data.d.ts +0 -4
- package/dist/src/tasks/reinforcement-learning/data.d.ts.map +0 -1
- package/dist/src/tasks/sentence-similarity/data.d.ts +0 -4
- package/dist/src/tasks/sentence-similarity/data.d.ts.map +0 -1
- package/dist/src/tasks/summarization/data.d.ts +0 -4
- package/dist/src/tasks/summarization/data.d.ts.map +0 -1
- package/dist/src/tasks/table-question-answering/data.d.ts +0 -4
- package/dist/src/tasks/table-question-answering/data.d.ts.map +0 -1
- package/dist/src/tasks/tabular-classification/data.d.ts +0 -4
- package/dist/src/tasks/tabular-classification/data.d.ts.map +0 -1
- package/dist/src/tasks/tabular-regression/data.d.ts +0 -4
- package/dist/src/tasks/tabular-regression/data.d.ts.map +0 -1
- package/dist/src/tasks/text-classification/data.d.ts +0 -4
- package/dist/src/tasks/text-classification/data.d.ts.map +0 -1
- package/dist/src/tasks/text-generation/data.d.ts +0 -4
- package/dist/src/tasks/text-generation/data.d.ts.map +0 -1
- package/dist/src/tasks/text-to-3d/data.d.ts +0 -4
- package/dist/src/tasks/text-to-3d/data.d.ts.map +0 -1
- package/dist/src/tasks/text-to-image/data.d.ts +0 -4
- package/dist/src/tasks/text-to-image/data.d.ts.map +0 -1
- package/dist/src/tasks/text-to-speech/data.d.ts +0 -4
- package/dist/src/tasks/text-to-speech/data.d.ts.map +0 -1
- package/dist/src/tasks/text-to-video/data.d.ts +0 -4
- package/dist/src/tasks/text-to-video/data.d.ts.map +0 -1
- package/dist/src/tasks/token-classification/data.d.ts +0 -4
- package/dist/src/tasks/token-classification/data.d.ts.map +0 -1
- package/dist/src/tasks/translation/data.d.ts +0 -4
- package/dist/src/tasks/translation/data.d.ts.map +0 -1
- package/dist/src/tasks/unconditional-image-generation/data.d.ts +0 -4
- package/dist/src/tasks/unconditional-image-generation/data.d.ts.map +0 -1
- package/dist/src/tasks/video-classification/data.d.ts +0 -4
- package/dist/src/tasks/video-classification/data.d.ts.map +0 -1
- package/dist/src/tasks/video-text-to-text/data.d.ts +0 -4
- package/dist/src/tasks/video-text-to-text/data.d.ts.map +0 -1
- package/dist/src/tasks/visual-question-answering/data.d.ts +0 -4
- package/dist/src/tasks/visual-question-answering/data.d.ts.map +0 -1
- package/dist/src/tasks/zero-shot-classification/data.d.ts +0 -4
- package/dist/src/tasks/zero-shot-classification/data.d.ts.map +0 -1
- package/dist/src/tasks/zero-shot-image-classification/data.d.ts +0 -4
- package/dist/src/tasks/zero-shot-image-classification/data.d.ts.map +0 -1
- package/dist/src/tasks/zero-shot-object-detection/data.d.ts +0 -4
- package/dist/src/tasks/zero-shot-object-detection/data.d.ts.map +0 -1
- package/dist/src/widget-example.d.ts +0 -83
- package/dist/src/widget-example.d.ts.map +0 -1
- package/src/dataset-libraries.ts +0 -89
- package/src/default-widget-inputs.ts +0 -718
- package/src/gguf.ts +0 -40
- package/src/hardware.ts +0 -482
- package/src/index.ts +0 -55
- package/src/library-to-tasks.ts +0 -76
- package/src/local-apps.ts +0 -412
- package/src/model-data.ts +0 -149
- package/src/model-libraries-downloads.ts +0 -18
- package/src/model-libraries-snippets.ts +0 -1128
- package/src/model-libraries.ts +0 -820
- package/src/pipelines.ts +0 -698
- package/src/snippets/common.ts +0 -39
- package/src/snippets/curl.spec.ts +0 -68
- package/src/snippets/curl.ts +0 -116
- package/src/snippets/index.ts +0 -6
- package/src/snippets/inputs.ts +0 -167
- package/src/snippets/js.spec.ts +0 -86
- package/src/snippets/js.ts +0 -304
- package/src/snippets/python.spec.ts +0 -78
- package/src/snippets/python.ts +0 -304
- package/src/snippets/types.ts +0 -16
- package/src/tasks/audio-classification/about.md +0 -86
- package/src/tasks/audio-classification/data.ts +0 -81
- package/src/tasks/audio-classification/inference.ts +0 -52
- package/src/tasks/audio-classification/spec/input.json +0 -35
- package/src/tasks/audio-classification/spec/output.json +0 -11
- package/src/tasks/audio-to-audio/about.md +0 -56
- package/src/tasks/audio-to-audio/data.ts +0 -70
- package/src/tasks/automatic-speech-recognition/about.md +0 -90
- package/src/tasks/automatic-speech-recognition/data.ts +0 -82
- package/src/tasks/automatic-speech-recognition/inference.ts +0 -160
- package/src/tasks/automatic-speech-recognition/spec/input.json +0 -35
- package/src/tasks/automatic-speech-recognition/spec/output.json +0 -38
- package/src/tasks/chat-completion/inference.ts +0 -322
- package/src/tasks/chat-completion/spec/input.json +0 -350
- package/src/tasks/chat-completion/spec/output.json +0 -206
- package/src/tasks/chat-completion/spec/stream_output.json +0 -213
- package/src/tasks/common-definitions.json +0 -100
- package/src/tasks/depth-estimation/about.md +0 -45
- package/src/tasks/depth-estimation/data.ts +0 -70
- package/src/tasks/depth-estimation/inference.ts +0 -35
- package/src/tasks/depth-estimation/spec/input.json +0 -25
- package/src/tasks/depth-estimation/spec/output.json +0 -16
- package/src/tasks/document-question-answering/about.md +0 -53
- package/src/tasks/document-question-answering/data.ts +0 -85
- package/src/tasks/document-question-answering/inference.ts +0 -110
- package/src/tasks/document-question-answering/spec/input.json +0 -85
- package/src/tasks/document-question-answering/spec/output.json +0 -36
- package/src/tasks/feature-extraction/about.md +0 -72
- package/src/tasks/feature-extraction/data.ts +0 -57
- package/src/tasks/feature-extraction/inference.ts +0 -40
- package/src/tasks/feature-extraction/spec/input.json +0 -47
- package/src/tasks/feature-extraction/spec/output.json +0 -15
- package/src/tasks/fill-mask/about.md +0 -51
- package/src/tasks/fill-mask/data.ts +0 -79
- package/src/tasks/fill-mask/inference.ts +0 -62
- package/src/tasks/fill-mask/spec/input.json +0 -38
- package/src/tasks/fill-mask/spec/output.json +0 -29
- package/src/tasks/image-classification/about.md +0 -50
- package/src/tasks/image-classification/data.ts +0 -88
- package/src/tasks/image-classification/inference.ts +0 -52
- package/src/tasks/image-classification/spec/input.json +0 -35
- package/src/tasks/image-classification/spec/output.json +0 -11
- package/src/tasks/image-feature-extraction/about.md +0 -23
- package/src/tasks/image-feature-extraction/data.ts +0 -59
- package/src/tasks/image-segmentation/about.md +0 -63
- package/src/tasks/image-segmentation/data.ts +0 -99
- package/src/tasks/image-segmentation/inference.ts +0 -69
- package/src/tasks/image-segmentation/spec/input.json +0 -45
- package/src/tasks/image-segmentation/spec/output.json +0 -26
- package/src/tasks/image-text-to-text/about.md +0 -76
- package/src/tasks/image-text-to-text/data.ts +0 -102
- package/src/tasks/image-to-3d/about.md +0 -62
- package/src/tasks/image-to-3d/data.ts +0 -75
- package/src/tasks/image-to-image/about.md +0 -129
- package/src/tasks/image-to-image/data.ts +0 -101
- package/src/tasks/image-to-image/inference.ts +0 -68
- package/src/tasks/image-to-image/spec/input.json +0 -55
- package/src/tasks/image-to-image/spec/output.json +0 -12
- package/src/tasks/image-to-text/about.md +0 -61
- package/src/tasks/image-to-text/data.ts +0 -82
- package/src/tasks/image-to-text/inference.ts +0 -143
- package/src/tasks/image-to-text/spec/input.json +0 -34
- package/src/tasks/image-to-text/spec/output.json +0 -14
- package/src/tasks/index.ts +0 -312
- package/src/tasks/keypoint-detection/about.md +0 -57
- package/src/tasks/keypoint-detection/data.ts +0 -50
- package/src/tasks/mask-generation/about.md +0 -65
- package/src/tasks/mask-generation/data.ts +0 -55
- package/src/tasks/object-detection/about.md +0 -37
- package/src/tasks/object-detection/data.ts +0 -86
- package/src/tasks/object-detection/inference.ts +0 -75
- package/src/tasks/object-detection/spec/input.json +0 -31
- package/src/tasks/object-detection/spec/output.json +0 -50
- package/src/tasks/placeholder/about.md +0 -15
- package/src/tasks/placeholder/data.ts +0 -21
- package/src/tasks/placeholder/spec/input.json +0 -35
- package/src/tasks/placeholder/spec/output.json +0 -17
- package/src/tasks/question-answering/about.md +0 -56
- package/src/tasks/question-answering/data.ts +0 -75
- package/src/tasks/question-answering/inference.ts +0 -99
- package/src/tasks/question-answering/spec/input.json +0 -67
- package/src/tasks/question-answering/spec/output.json +0 -29
- package/src/tasks/reinforcement-learning/about.md +0 -167
- package/src/tasks/reinforcement-learning/data.ts +0 -75
- package/src/tasks/sentence-similarity/about.md +0 -97
- package/src/tasks/sentence-similarity/data.ts +0 -101
- package/src/tasks/sentence-similarity/inference.ts +0 -32
- package/src/tasks/sentence-similarity/spec/input.json +0 -40
- package/src/tasks/sentence-similarity/spec/output.json +0 -12
- package/src/tasks/summarization/about.md +0 -58
- package/src/tasks/summarization/data.ts +0 -76
- package/src/tasks/summarization/inference.ts +0 -57
- package/src/tasks/summarization/spec/input.json +0 -42
- package/src/tasks/summarization/spec/output.json +0 -14
- package/src/tasks/table-question-answering/about.md +0 -43
- package/src/tasks/table-question-answering/data.ts +0 -59
- package/src/tasks/table-question-answering/inference.ts +0 -61
- package/src/tasks/table-question-answering/spec/input.json +0 -44
- package/src/tasks/table-question-answering/spec/output.json +0 -40
- package/src/tasks/tabular-classification/about.md +0 -65
- package/src/tasks/tabular-classification/data.ts +0 -68
- package/src/tasks/tabular-regression/about.md +0 -87
- package/src/tasks/tabular-regression/data.ts +0 -57
- package/src/tasks/text-classification/about.md +0 -173
- package/src/tasks/text-classification/data.ts +0 -103
- package/src/tasks/text-classification/inference.ts +0 -51
- package/src/tasks/text-classification/spec/input.json +0 -35
- package/src/tasks/text-classification/spec/output.json +0 -11
- package/src/tasks/text-generation/about.md +0 -154
- package/src/tasks/text-generation/data.ts +0 -114
- package/src/tasks/text-generation/inference.ts +0 -200
- package/src/tasks/text-generation/spec/input.json +0 -219
- package/src/tasks/text-generation/spec/output.json +0 -179
- package/src/tasks/text-generation/spec/stream_output.json +0 -103
- package/src/tasks/text-to-3d/about.md +0 -62
- package/src/tasks/text-to-3d/data.ts +0 -56
- package/src/tasks/text-to-audio/inference.ts +0 -143
- package/src/tasks/text-to-audio/spec/input.json +0 -31
- package/src/tasks/text-to-audio/spec/output.json +0 -17
- package/src/tasks/text-to-image/about.md +0 -96
- package/src/tasks/text-to-image/data.ts +0 -100
- package/src/tasks/text-to-image/inference.ts +0 -75
- package/src/tasks/text-to-image/spec/input.json +0 -63
- package/src/tasks/text-to-image/spec/output.json +0 -13
- package/src/tasks/text-to-speech/about.md +0 -63
- package/src/tasks/text-to-speech/data.ts +0 -79
- package/src/tasks/text-to-speech/inference.ts +0 -145
- package/src/tasks/text-to-speech/spec/input.json +0 -31
- package/src/tasks/text-to-speech/spec/output.json +0 -7
- package/src/tasks/text-to-video/about.md +0 -41
- package/src/tasks/text-to-video/data.ts +0 -102
- package/src/tasks/text2text-generation/inference.ts +0 -55
- package/src/tasks/text2text-generation/spec/input.json +0 -55
- package/src/tasks/text2text-generation/spec/output.json +0 -14
- package/src/tasks/token-classification/about.md +0 -76
- package/src/tasks/token-classification/data.ts +0 -92
- package/src/tasks/token-classification/inference.ts +0 -85
- package/src/tasks/token-classification/spec/input.json +0 -65
- package/src/tasks/token-classification/spec/output.json +0 -37
- package/src/tasks/translation/about.md +0 -65
- package/src/tasks/translation/data.ts +0 -70
- package/src/tasks/translation/inference.ts +0 -67
- package/src/tasks/translation/spec/input.json +0 -50
- package/src/tasks/translation/spec/output.json +0 -14
- package/src/tasks/unconditional-image-generation/about.md +0 -50
- package/src/tasks/unconditional-image-generation/data.ts +0 -72
- package/src/tasks/video-classification/about.md +0 -37
- package/src/tasks/video-classification/data.ts +0 -84
- package/src/tasks/video-classification/inference.ts +0 -59
- package/src/tasks/video-classification/spec/input.json +0 -42
- package/src/tasks/video-classification/spec/output.json +0 -10
- package/src/tasks/video-text-to-text/about.md +0 -98
- package/src/tasks/video-text-to-text/data.ts +0 -66
- package/src/tasks/visual-question-answering/about.md +0 -48
- package/src/tasks/visual-question-answering/data.ts +0 -97
- package/src/tasks/visual-question-answering/inference.ts +0 -62
- package/src/tasks/visual-question-answering/spec/input.json +0 -41
- package/src/tasks/visual-question-answering/spec/output.json +0 -21
- package/src/tasks/zero-shot-classification/about.md +0 -40
- package/src/tasks/zero-shot-classification/data.ts +0 -70
- package/src/tasks/zero-shot-classification/inference.ts +0 -67
- package/src/tasks/zero-shot-classification/spec/input.json +0 -50
- package/src/tasks/zero-shot-classification/spec/output.json +0 -11
- package/src/tasks/zero-shot-image-classification/about.md +0 -75
- package/src/tasks/zero-shot-image-classification/data.ts +0 -84
- package/src/tasks/zero-shot-image-classification/inference.ts +0 -61
- package/src/tasks/zero-shot-image-classification/spec/input.json +0 -45
- package/src/tasks/zero-shot-image-classification/spec/output.json +0 -10
- package/src/tasks/zero-shot-object-detection/about.md +0 -45
- package/src/tasks/zero-shot-object-detection/data.ts +0 -67
- package/src/tasks/zero-shot-object-detection/inference.ts +0 -66
- package/src/tasks/zero-shot-object-detection/spec/input.json +0 -40
- package/src/tasks/zero-shot-object-detection/spec/output.json +0 -47
- package/src/tokenizer-data.ts +0 -32
- package/src/widget-example.ts +0 -125
- package/tsconfig.json +0 -20
- /package/dist/{src → commonjs}/dataset-libraries.d.ts +0 -0
- /package/dist/{src → commonjs}/dataset-libraries.d.ts.map +0 -0
- /package/dist/{src → commonjs}/gguf.d.ts +0 -0
- /package/dist/{src → commonjs}/gguf.d.ts.map +0 -0
- /package/dist/{src → commonjs}/hardware.d.ts +0 -0
- /package/dist/{src → commonjs}/hardware.d.ts.map +0 -0
- /package/dist/{src → commonjs}/model-libraries-downloads.d.ts +0 -0
- /package/dist/{src → commonjs}/model-libraries-downloads.d.ts.map +0 -0
- /package/dist/{src → commonjs}/snippets/curl.spec.d.ts +0 -0
- /package/dist/{src → commonjs}/snippets/curl.spec.d.ts.map +0 -0
- /package/dist/{src → commonjs}/snippets/js.spec.d.ts +0 -0
- /package/dist/{src → commonjs}/snippets/js.spec.d.ts.map +0 -0
- /package/dist/{src → commonjs}/snippets/python.spec.d.ts +0 -0
- /package/dist/{src → commonjs}/snippets/python.spec.d.ts.map +0 -0
- /package/dist/{src → commonjs}/tasks/audio-classification/inference.d.ts +0 -0
- /package/dist/{src → commonjs}/tasks/audio-classification/inference.d.ts.map +0 -0
- /package/dist/{src → commonjs}/tasks/automatic-speech-recognition/inference.d.ts +0 -0
- /package/dist/{src → commonjs}/tasks/automatic-speech-recognition/inference.d.ts.map +0 -0
- /package/dist/{src → commonjs}/tasks/chat-completion/inference.d.ts +0 -0
- /package/dist/{src → commonjs}/tasks/chat-completion/inference.d.ts.map +0 -0
- /package/dist/{src → commonjs}/tasks/depth-estimation/inference.d.ts +0 -0
- /package/dist/{src → commonjs}/tasks/depth-estimation/inference.d.ts.map +0 -0
- /package/dist/{src → commonjs}/tasks/document-question-answering/inference.d.ts +0 -0
- /package/dist/{src → commonjs}/tasks/document-question-answering/inference.d.ts.map +0 -0
- /package/dist/{src → commonjs}/tasks/feature-extraction/inference.d.ts +0 -0
- /package/dist/{src → commonjs}/tasks/feature-extraction/inference.d.ts.map +0 -0
- /package/dist/{src → commonjs}/tasks/fill-mask/inference.d.ts +0 -0
- /package/dist/{src → commonjs}/tasks/fill-mask/inference.d.ts.map +0 -0
- /package/dist/{src → commonjs}/tasks/image-classification/inference.d.ts +0 -0
- /package/dist/{src → commonjs}/tasks/image-classification/inference.d.ts.map +0 -0
- /package/dist/{src → commonjs}/tasks/image-segmentation/inference.d.ts +0 -0
- /package/dist/{src → commonjs}/tasks/image-segmentation/inference.d.ts.map +0 -0
- /package/dist/{src → commonjs}/tasks/image-to-image/inference.d.ts +0 -0
- /package/dist/{src → commonjs}/tasks/image-to-image/inference.d.ts.map +0 -0
- /package/dist/{src → commonjs}/tasks/image-to-text/inference.d.ts +0 -0
- /package/dist/{src → commonjs}/tasks/image-to-text/inference.d.ts.map +0 -0
- /package/dist/{src → commonjs}/tasks/object-detection/inference.d.ts +0 -0
- /package/dist/{src → commonjs}/tasks/object-detection/inference.d.ts.map +0 -0
- /package/dist/{src → commonjs}/tasks/question-answering/inference.d.ts +0 -0
- /package/dist/{src → commonjs}/tasks/question-answering/inference.d.ts.map +0 -0
- /package/dist/{src → commonjs}/tasks/sentence-similarity/inference.d.ts +0 -0
- /package/dist/{src → commonjs}/tasks/sentence-similarity/inference.d.ts.map +0 -0
- /package/dist/{src → commonjs}/tasks/summarization/inference.d.ts +0 -0
- /package/dist/{src → commonjs}/tasks/summarization/inference.d.ts.map +0 -0
- /package/dist/{src → commonjs}/tasks/table-question-answering/inference.d.ts +0 -0
- /package/dist/{src → commonjs}/tasks/table-question-answering/inference.d.ts.map +0 -0
- /package/dist/{src → commonjs}/tasks/text-classification/inference.d.ts +0 -0
- /package/dist/{src → commonjs}/tasks/text-classification/inference.d.ts.map +0 -0
- /package/dist/{src → commonjs}/tasks/text-generation/inference.d.ts +0 -0
- /package/dist/{src → commonjs}/tasks/text-generation/inference.d.ts.map +0 -0
- /package/dist/{src → commonjs}/tasks/text-to-audio/inference.d.ts +0 -0
- /package/dist/{src → commonjs}/tasks/text-to-audio/inference.d.ts.map +0 -0
- /package/dist/{src → commonjs}/tasks/text-to-image/inference.d.ts +0 -0
- /package/dist/{src → commonjs}/tasks/text-to-image/inference.d.ts.map +0 -0
- /package/dist/{src → commonjs}/tasks/text-to-speech/inference.d.ts +0 -0
- /package/dist/{src → commonjs}/tasks/text-to-speech/inference.d.ts.map +0 -0
- /package/dist/{src → commonjs}/tasks/text2text-generation/inference.d.ts +0 -0
- /package/dist/{src → commonjs}/tasks/text2text-generation/inference.d.ts.map +0 -0
- /package/dist/{src → commonjs}/tasks/token-classification/inference.d.ts +0 -0
- /package/dist/{src → commonjs}/tasks/token-classification/inference.d.ts.map +0 -0
- /package/dist/{src → commonjs}/tasks/translation/inference.d.ts +0 -0
- /package/dist/{src → commonjs}/tasks/translation/inference.d.ts.map +0 -0
- /package/dist/{src → commonjs}/tasks/video-classification/inference.d.ts +0 -0
- /package/dist/{src → commonjs}/tasks/video-classification/inference.d.ts.map +0 -0
- /package/dist/{src → commonjs}/tasks/visual-question-answering/inference.d.ts +0 -0
- /package/dist/{src → commonjs}/tasks/visual-question-answering/inference.d.ts.map +0 -0
- /package/dist/{src → commonjs}/tasks/zero-shot-classification/inference.d.ts +0 -0
- /package/dist/{src → commonjs}/tasks/zero-shot-classification/inference.d.ts.map +0 -0
- /package/dist/{src → commonjs}/tasks/zero-shot-image-classification/inference.d.ts +0 -0
- /package/dist/{src → commonjs}/tasks/zero-shot-image-classification/inference.d.ts.map +0 -0
- /package/dist/{src → commonjs}/tasks/zero-shot-object-detection/inference.d.ts +0 -0
- /package/dist/{src → commonjs}/tasks/zero-shot-object-detection/inference.d.ts.map +0 -0
- /package/dist/{src → commonjs}/tokenizer-data.d.ts +0 -0
- /package/dist/{src → commonjs}/tokenizer-data.d.ts.map +0 -0
|
@@ -1,86 +0,0 @@
|
|
|
1
|
-
## Use Cases
|
|
2
|
-
|
|
3
|
-
### Command Recognition
|
|
4
|
-
|
|
5
|
-
Command recognition or keyword spotting classifies utterances into a predefined set of commands. This is often done on-device for fast response time.
|
|
6
|
-
|
|
7
|
-
As an example, using the Google Speech Commands dataset, given an input, a model can classify which of the following commands the user is typing:
|
|
8
|
-
|
|
9
|
-
```
|
|
10
|
-
'yes', 'no', 'up', 'down', 'left', 'right', 'on', 'off', 'stop', 'go', 'unknown', 'silence'
|
|
11
|
-
```
|
|
12
|
-
|
|
13
|
-
Speechbrain models can easily perform this task with just a couple of lines of code!
|
|
14
|
-
|
|
15
|
-
```python
|
|
16
|
-
from speechbrain.pretrained import EncoderClassifier
|
|
17
|
-
model = EncoderClassifier.from_hparams(
|
|
18
|
-
"speechbrain/google_speech_command_xvector"
|
|
19
|
-
)
|
|
20
|
-
model.classify_file("file.wav")
|
|
21
|
-
```
|
|
22
|
-
|
|
23
|
-
### Language Identification
|
|
24
|
-
|
|
25
|
-
Datasets such as VoxLingua107 allow anyone to train language identification models for up to 107 languages! This can be extremely useful as a preprocessing step for other systems. Here's an example [model](https://huggingface.co/TalTechNLP/voxlingua107-epaca-tdnn)trained on VoxLingua107.
|
|
26
|
-
|
|
27
|
-
### Emotion recognition
|
|
28
|
-
|
|
29
|
-
Emotion recognition is self explanatory. In addition to trying the widgets, you can use Inference Endpoints to perform audio classification. Here is a simple example that uses a [HuBERT](https://huggingface.co/superb/hubert-large-superb-er) model fine-tuned for this task.
|
|
30
|
-
|
|
31
|
-
```python
|
|
32
|
-
import json
|
|
33
|
-
import requests
|
|
34
|
-
|
|
35
|
-
headers = {"Authorization": f"Bearer {API_TOKEN}"}
|
|
36
|
-
API_URL = "https://api-inference.huggingface.co/models/superb/hubert-large-superb-er"
|
|
37
|
-
|
|
38
|
-
def query(filename):
|
|
39
|
-
with open(filename, "rb") as f:
|
|
40
|
-
data = f.read()
|
|
41
|
-
response = requests.request("POST", API_URL, headers=headers, data=data)
|
|
42
|
-
return json.loads(response.content.decode("utf-8"))
|
|
43
|
-
|
|
44
|
-
data = query("sample1.flac")
|
|
45
|
-
# [{'label': 'neu', 'score': 0.60},
|
|
46
|
-
# {'label': 'hap', 'score': 0.20},
|
|
47
|
-
# {'label': 'ang', 'score': 0.13},
|
|
48
|
-
# {'label': 'sad', 'score': 0.07}]
|
|
49
|
-
```
|
|
50
|
-
|
|
51
|
-
You can use [huggingface.js](https://github.com/huggingface/huggingface.js) to infer with audio classification models on Hugging Face Hub.
|
|
52
|
-
|
|
53
|
-
```javascript
|
|
54
|
-
import { HfInference } from "@huggingface/inference";
|
|
55
|
-
|
|
56
|
-
const inference = new HfInference(HF_TOKEN);
|
|
57
|
-
await inference.audioClassification({
|
|
58
|
-
data: await (await fetch("sample.flac")).blob(),
|
|
59
|
-
model: "facebook/mms-lid-126",
|
|
60
|
-
});
|
|
61
|
-
```
|
|
62
|
-
|
|
63
|
-
### Speaker Identification
|
|
64
|
-
|
|
65
|
-
Speaker Identification is classifying the audio of the person speaking. Speakers are usually predefined. You can try out this task with [this model](https://huggingface.co/superb/wav2vec2-base-superb-sid). A useful dataset for this task is VoxCeleb1.
|
|
66
|
-
|
|
67
|
-
## Solving audio classification for your own data
|
|
68
|
-
|
|
69
|
-
We have some great news! You can do fine-tuning (transfer learning) to train a well-performing model without requiring as much data. Pretrained models such as Wav2Vec2 and HuBERT exist. [Facebook's Wav2Vec2 XLS-R model](https://huggingface.co/docs/transformers/model_doc/xlsr_wav2vec2) is a large multilingual model trained on 128 languages and with 436K hours of speech. Similarly, you can also use [OpenAI's Whisper](https://huggingface.co/docs/transformers/model_doc/whisper) trained on up to 4 Million hours of multilingual speech data for this task too!
|
|
70
|
-
|
|
71
|
-
## Useful Resources
|
|
72
|
-
|
|
73
|
-
Would you like to learn more about the topic? Awesome! Here you can find some curated resources that you may find helpful!
|
|
74
|
-
|
|
75
|
-
### Notebooks
|
|
76
|
-
|
|
77
|
-
- [PyTorch](https://colab.research.google.com/github/huggingface/notebooks/blob/master/examples/audio_classification.ipynb)
|
|
78
|
-
|
|
79
|
-
### Scripts for training
|
|
80
|
-
|
|
81
|
-
- [PyTorch](https://github.com/huggingface/transformers/tree/main/examples/pytorch/audio-classification)
|
|
82
|
-
|
|
83
|
-
### Documentation
|
|
84
|
-
|
|
85
|
-
- [Hugging Face Audio Course](https://huggingface.co/learn/audio-course/chapter4/introduction)
|
|
86
|
-
- [Audio classification task guide](https://huggingface.co/docs/transformers/tasks/audio_classification)
|
|
@@ -1,81 +0,0 @@
|
|
|
1
|
-
import type { TaskDataCustom } from "..";
|
|
2
|
-
|
|
3
|
-
const taskData: TaskDataCustom = {
|
|
4
|
-
datasets: [
|
|
5
|
-
{
|
|
6
|
-
description: "A benchmark of 10 different audio tasks.",
|
|
7
|
-
id: "s3prl/superb",
|
|
8
|
-
},
|
|
9
|
-
{
|
|
10
|
-
description: "A dataset of YouTube clips and their sound categories.",
|
|
11
|
-
id: "agkphysics/AudioSet",
|
|
12
|
-
},
|
|
13
|
-
],
|
|
14
|
-
demo: {
|
|
15
|
-
inputs: [
|
|
16
|
-
{
|
|
17
|
-
filename: "audio.wav",
|
|
18
|
-
type: "audio",
|
|
19
|
-
},
|
|
20
|
-
],
|
|
21
|
-
outputs: [
|
|
22
|
-
{
|
|
23
|
-
data: [
|
|
24
|
-
{
|
|
25
|
-
label: "Up",
|
|
26
|
-
score: 0.2,
|
|
27
|
-
},
|
|
28
|
-
{
|
|
29
|
-
label: "Down",
|
|
30
|
-
score: 0.8,
|
|
31
|
-
},
|
|
32
|
-
],
|
|
33
|
-
type: "chart",
|
|
34
|
-
},
|
|
35
|
-
],
|
|
36
|
-
},
|
|
37
|
-
metrics: [
|
|
38
|
-
{
|
|
39
|
-
description: "",
|
|
40
|
-
id: "accuracy",
|
|
41
|
-
},
|
|
42
|
-
{
|
|
43
|
-
description: "",
|
|
44
|
-
id: "recall",
|
|
45
|
-
},
|
|
46
|
-
{
|
|
47
|
-
description: "",
|
|
48
|
-
id: "precision",
|
|
49
|
-
},
|
|
50
|
-
{
|
|
51
|
-
description: "",
|
|
52
|
-
id: "f1",
|
|
53
|
-
},
|
|
54
|
-
],
|
|
55
|
-
models: [
|
|
56
|
-
{
|
|
57
|
-
description: "An easy-to-use model for command recognition.",
|
|
58
|
-
id: "speechbrain/google_speech_command_xvector",
|
|
59
|
-
},
|
|
60
|
-
{
|
|
61
|
-
description: "An emotion recognition model.",
|
|
62
|
-
id: "ehcalabres/wav2vec2-lg-xlsr-en-speech-emotion-recognition",
|
|
63
|
-
},
|
|
64
|
-
{
|
|
65
|
-
description: "A language identification model.",
|
|
66
|
-
id: "facebook/mms-lid-126",
|
|
67
|
-
},
|
|
68
|
-
],
|
|
69
|
-
spaces: [
|
|
70
|
-
{
|
|
71
|
-
description: "An application that can classify music into different genre.",
|
|
72
|
-
id: "kurianbenoy/audioclassification",
|
|
73
|
-
},
|
|
74
|
-
],
|
|
75
|
-
summary:
|
|
76
|
-
"Audio classification is the task of assigning a label or class to a given audio. It can be used for recognizing which command a user is giving or the emotion of a statement, as well as identifying a speaker.",
|
|
77
|
-
widgetModels: ["MIT/ast-finetuned-audioset-10-10-0.4593"],
|
|
78
|
-
youtubeId: "KWwzcmG98Ds",
|
|
79
|
-
};
|
|
80
|
-
|
|
81
|
-
export default taskData;
|
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Inference code generated from the JSON schema spec in ./spec
|
|
3
|
-
*
|
|
4
|
-
* Using src/scripts/inference-codegen
|
|
5
|
-
*/
|
|
6
|
-
/**
|
|
7
|
-
* Inputs for Audio Classification inference
|
|
8
|
-
*/
|
|
9
|
-
export interface AudioClassificationInput {
|
|
10
|
-
/**
|
|
11
|
-
* The input audio data as a base64-encoded string. If no `parameters` are provided, you can
|
|
12
|
-
* also provide the audio data as a raw bytes payload.
|
|
13
|
-
*/
|
|
14
|
-
inputs: string;
|
|
15
|
-
/**
|
|
16
|
-
* Additional inference parameters
|
|
17
|
-
*/
|
|
18
|
-
parameters?: AudioClassificationParameters;
|
|
19
|
-
[property: string]: unknown;
|
|
20
|
-
}
|
|
21
|
-
/**
|
|
22
|
-
* Additional inference parameters
|
|
23
|
-
*
|
|
24
|
-
* Additional inference parameters for Audio Classification
|
|
25
|
-
*/
|
|
26
|
-
export interface AudioClassificationParameters {
|
|
27
|
-
function_to_apply?: ClassificationOutputTransform;
|
|
28
|
-
/**
|
|
29
|
-
* When specified, limits the output to the top K most probable classes.
|
|
30
|
-
*/
|
|
31
|
-
top_k?: number;
|
|
32
|
-
[property: string]: unknown;
|
|
33
|
-
}
|
|
34
|
-
/**
|
|
35
|
-
* The function to apply to the model outputs in order to retrieve the scores.
|
|
36
|
-
*/
|
|
37
|
-
export type ClassificationOutputTransform = "sigmoid" | "softmax" | "none";
|
|
38
|
-
export type AudioClassificationOutput = AudioClassificationOutputElement[];
|
|
39
|
-
/**
|
|
40
|
-
* Outputs for Audio Classification inference
|
|
41
|
-
*/
|
|
42
|
-
export interface AudioClassificationOutputElement {
|
|
43
|
-
/**
|
|
44
|
-
* The predicted class label.
|
|
45
|
-
*/
|
|
46
|
-
label: string;
|
|
47
|
-
/**
|
|
48
|
-
* The corresponding probability.
|
|
49
|
-
*/
|
|
50
|
-
score: number;
|
|
51
|
-
[property: string]: unknown;
|
|
52
|
-
}
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"$id": "/inference/schemas/audio-classification/input.json",
|
|
3
|
-
"$schema": "http://json-schema.org/draft-06/schema#",
|
|
4
|
-
"description": "Inputs for Audio Classification inference",
|
|
5
|
-
"title": "AudioClassificationInput",
|
|
6
|
-
"type": "object",
|
|
7
|
-
"properties": {
|
|
8
|
-
"inputs": {
|
|
9
|
-
"description": "The input audio data as a base64-encoded string. If no `parameters` are provided, you can also provide the audio data as a raw bytes payload.",
|
|
10
|
-
"type": "string"
|
|
11
|
-
},
|
|
12
|
-
"parameters": {
|
|
13
|
-
"description": "Additional inference parameters",
|
|
14
|
-
"$ref": "#/$defs/AudioClassificationParameters"
|
|
15
|
-
}
|
|
16
|
-
},
|
|
17
|
-
"$defs": {
|
|
18
|
-
"AudioClassificationParameters": {
|
|
19
|
-
"title": "AudioClassificationParameters",
|
|
20
|
-
"description": "Additional inference parameters for Audio Classification",
|
|
21
|
-
"type": "object",
|
|
22
|
-
"properties": {
|
|
23
|
-
"function_to_apply": {
|
|
24
|
-
"title": "AudioClassificationOutputTransform",
|
|
25
|
-
"$ref": "/inference/schemas/common-definitions.json#/definitions/ClassificationOutputTransform"
|
|
26
|
-
},
|
|
27
|
-
"top_k": {
|
|
28
|
-
"type": "integer",
|
|
29
|
-
"description": "When specified, limits the output to the top K most probable classes."
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
},
|
|
34
|
-
"required": ["inputs"]
|
|
35
|
-
}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"$id": "/inference/schemas/audio-classification/output.json",
|
|
3
|
-
"$schema": "http://json-schema.org/draft-06/schema#",
|
|
4
|
-
"title": "AudioClassificationOutput",
|
|
5
|
-
"description": "Outputs for Audio Classification inference",
|
|
6
|
-
"type": "array",
|
|
7
|
-
"items": {
|
|
8
|
-
"type": "object",
|
|
9
|
-
"$ref": "/inference/schemas/common-definitions.json#/definitions/ClassificationOutput"
|
|
10
|
-
}
|
|
11
|
-
}
|
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
## Use Cases
|
|
2
|
-
|
|
3
|
-
### Speech Enhancement (Noise removal)
|
|
4
|
-
|
|
5
|
-
Speech Enhancement is a bit self explanatory. It improves (or enhances) the quality of an audio by removing noise. There are multiple libraries to solve this task, such as Speechbrain, Asteroid and ESPNet. Here is a simple example using Speechbrain
|
|
6
|
-
|
|
7
|
-
```python
|
|
8
|
-
from speechbrain.pretrained import SpectralMaskEnhancement
|
|
9
|
-
model = SpectralMaskEnhancement.from_hparams(
|
|
10
|
-
"speechbrain/mtl-mimic-voicebank"
|
|
11
|
-
)
|
|
12
|
-
model.enhance_file("file.wav")
|
|
13
|
-
```
|
|
14
|
-
|
|
15
|
-
Alternatively, you can use [Inference Endpoints](https://huggingface.co/inference-endpoints) to solve this task
|
|
16
|
-
|
|
17
|
-
```python
|
|
18
|
-
import json
|
|
19
|
-
import requests
|
|
20
|
-
|
|
21
|
-
headers = {"Authorization": f"Bearer {API_TOKEN}"}
|
|
22
|
-
API_URL = "https://api-inference.huggingface.co/models/speechbrain/mtl-mimic-voicebank"
|
|
23
|
-
|
|
24
|
-
def query(filename):
|
|
25
|
-
with open(filename, "rb") as f:
|
|
26
|
-
data = f.read()
|
|
27
|
-
response = requests.request("POST", API_URL, headers=headers, data=data)
|
|
28
|
-
return json.loads(response.content.decode("utf-8"))
|
|
29
|
-
|
|
30
|
-
data = query("sample1.flac")
|
|
31
|
-
```
|
|
32
|
-
|
|
33
|
-
You can use [huggingface.js](https://github.com/huggingface/huggingface.js) to infer with audio-to-audio models on Hugging Face Hub.
|
|
34
|
-
|
|
35
|
-
```javascript
|
|
36
|
-
import { HfInference } from "@huggingface/inference";
|
|
37
|
-
|
|
38
|
-
const inference = new HfInference(HF_TOKEN);
|
|
39
|
-
await inference.audioToAudio({
|
|
40
|
-
data: await (await fetch("sample.flac")).blob(),
|
|
41
|
-
model: "speechbrain/sepformer-wham",
|
|
42
|
-
});
|
|
43
|
-
```
|
|
44
|
-
|
|
45
|
-
### Audio Source Separation
|
|
46
|
-
|
|
47
|
-
Audio Source Separation allows you to isolate different sounds from individual sources. For example, if you have an audio file with multiple people speaking, you can get an audio file for each of them. You can then use an Automatic Speech Recognition system to extract the text from each of these sources as an initial step for your system!
|
|
48
|
-
|
|
49
|
-
Audio-to-Audio can also be used to remove noise from audio files: you get one audio for the person speaking and another audio for the noise. This can also be useful when you have multi-person audio with some noise: yyou can get one audio for each person and then one audio for the noise.
|
|
50
|
-
|
|
51
|
-
## Training a model for your own data
|
|
52
|
-
|
|
53
|
-
If you want to learn how to train models for the Audio-to-Audio task, we recommend the following tutorials:
|
|
54
|
-
|
|
55
|
-
- [Speech Enhancement](https://speechbrain.github.io/tutorial_enhancement.html)
|
|
56
|
-
- [Source Separation](https://speechbrain.github.io/tutorial_separation.html)
|
|
@@ -1,70 +0,0 @@
|
|
|
1
|
-
import type { TaskDataCustom } from "..";
|
|
2
|
-
|
|
3
|
-
const taskData: TaskDataCustom = {
|
|
4
|
-
datasets: [
|
|
5
|
-
{
|
|
6
|
-
description: "512-element X-vector embeddings of speakers from CMU ARCTIC dataset.",
|
|
7
|
-
id: "Matthijs/cmu-arctic-xvectors",
|
|
8
|
-
},
|
|
9
|
-
],
|
|
10
|
-
demo: {
|
|
11
|
-
inputs: [
|
|
12
|
-
{
|
|
13
|
-
filename: "input.wav",
|
|
14
|
-
type: "audio",
|
|
15
|
-
},
|
|
16
|
-
],
|
|
17
|
-
outputs: [
|
|
18
|
-
{
|
|
19
|
-
filename: "label-0.wav",
|
|
20
|
-
type: "audio",
|
|
21
|
-
},
|
|
22
|
-
{
|
|
23
|
-
filename: "label-1.wav",
|
|
24
|
-
type: "audio",
|
|
25
|
-
},
|
|
26
|
-
],
|
|
27
|
-
},
|
|
28
|
-
metrics: [
|
|
29
|
-
{
|
|
30
|
-
description:
|
|
31
|
-
"The Signal-to-Noise ratio is the relationship between the target signal level and the background noise level. It is calculated as the logarithm of the target signal divided by the background noise, in decibels.",
|
|
32
|
-
id: "snri",
|
|
33
|
-
},
|
|
34
|
-
{
|
|
35
|
-
description:
|
|
36
|
-
"The Signal-to-Distortion ratio is the relationship between the target signal and the sum of noise, interference, and artifact errors",
|
|
37
|
-
id: "sdri",
|
|
38
|
-
},
|
|
39
|
-
],
|
|
40
|
-
models: [
|
|
41
|
-
{
|
|
42
|
-
description: "A solid model of audio source separation.",
|
|
43
|
-
id: "speechbrain/sepformer-wham",
|
|
44
|
-
},
|
|
45
|
-
{
|
|
46
|
-
description: "A speech enhancement model.",
|
|
47
|
-
id: "ResembleAI/resemble-enhance",
|
|
48
|
-
},
|
|
49
|
-
{
|
|
50
|
-
description: "A model that can change the voice in a speech recording.",
|
|
51
|
-
id: "microsoft/speecht5_vc",
|
|
52
|
-
},
|
|
53
|
-
],
|
|
54
|
-
spaces: [
|
|
55
|
-
{
|
|
56
|
-
description: "An application for speech separation.",
|
|
57
|
-
id: "younver/speechbrain-speech-separation",
|
|
58
|
-
},
|
|
59
|
-
{
|
|
60
|
-
description: "An application for audio style transfer.",
|
|
61
|
-
id: "nakas/audio-diffusion_style_transfer",
|
|
62
|
-
},
|
|
63
|
-
],
|
|
64
|
-
summary:
|
|
65
|
-
"Audio-to-Audio is a family of tasks in which the input is an audio and the output is one or multiple generated audios. Some example tasks are speech enhancement and source separation.",
|
|
66
|
-
widgetModels: ["speechbrain/sepformer-wham"],
|
|
67
|
-
youtubeId: "iohj7nCCYoM",
|
|
68
|
-
};
|
|
69
|
-
|
|
70
|
-
export default taskData;
|
|
@@ -1,90 +0,0 @@
|
|
|
1
|
-
## Use Cases
|
|
2
|
-
|
|
3
|
-
### Virtual Speech Assistants
|
|
4
|
-
|
|
5
|
-
Many edge devices have an embedded virtual assistant to interact with the end users better. These assistances rely on ASR models to recognize different voice commands to perform various tasks. For instance, you can ask your phone for dialing a phone number, ask a general question, or schedule a meeting.
|
|
6
|
-
|
|
7
|
-
### Caption Generation
|
|
8
|
-
|
|
9
|
-
A caption generation model takes audio as input from sources to generate automatic captions through transcription, for live-streamed or recorded videos. This can help with content accessibility. For example, an audience watching a video that includes a non-native language, can rely on captions to interpret the content. It can also help with information retention at online-classes environments improving knowledge assimilation while reading and taking notes faster.
|
|
10
|
-
|
|
11
|
-
## Task Variants
|
|
12
|
-
|
|
13
|
-
### Multilingual ASR
|
|
14
|
-
|
|
15
|
-
Multilingual ASR models can convert audio inputs with multiple languages into transcripts. Some multilingual ASR models include [language identification](https://huggingface.co/tasks/audio-classification) blocks to improve the performance.
|
|
16
|
-
|
|
17
|
-
The use of Multilingual ASR has become popular, the idea of maintaining just a single model for all language can simplify the production pipeline. Take a look at [Whisper](https://huggingface.co/openai/whisper-large-v2) to get an idea on how 100+ languages can be processed by a single model.
|
|
18
|
-
|
|
19
|
-
## Inference
|
|
20
|
-
|
|
21
|
-
The Hub contains over [17,000 ASR models](https://huggingface.co/models?pipeline_tag=automatic-speech-recognition&sort=downloads) that you can test right away in your browser using the model page widgets. You can also use any model as a service using the Serverless Inference API. We also support libraries such as [transformers](https://huggingface.co/models?library=transformers&pipeline_tag=automatic-speech-recognition&sort=downloads), [speechbrain](https://huggingface.co/models?library=speechbrain&pipeline_tag=automatic-speech-recognition&sort=downloads), [NeMo](https://huggingface.co/models?pipeline_tag=automatic-speech-recognition&library=nemo&sort=downloads) and [espnet](https://huggingface.co/models?library=espnet&pipeline_tag=automatic-speech-recognition&sort=downloads) via the Serverless Inference API. Here's a simple code snippet to run inference:
|
|
22
|
-
|
|
23
|
-
```python
|
|
24
|
-
import json
|
|
25
|
-
import requests
|
|
26
|
-
|
|
27
|
-
headers = {"Authorization": f"Bearer {API_TOKEN}"}
|
|
28
|
-
API_URL = "https://api-inference.huggingface.co/models/openai/whisper-large-v3"
|
|
29
|
-
|
|
30
|
-
def query(filename):
|
|
31
|
-
with open(filename, "rb") as f:
|
|
32
|
-
data = f.read()
|
|
33
|
-
response = requests.request("POST", API_URL, headers=headers, data=data)
|
|
34
|
-
return json.loads(response.content.decode("utf-8"))
|
|
35
|
-
|
|
36
|
-
data = query("sample1.flac")
|
|
37
|
-
```
|
|
38
|
-
|
|
39
|
-
You can also use [huggingface.js](https://github.com/huggingface/huggingface.js), the JavaScript client, to transcribe audio with the Serverless Inference API.
|
|
40
|
-
|
|
41
|
-
```javascript
|
|
42
|
-
import { HfInference } from "@huggingface/inference";
|
|
43
|
-
|
|
44
|
-
const inference = new HfInference(HF_TOKEN);
|
|
45
|
-
await inference.automaticSpeechRecognition({
|
|
46
|
-
data: await (await fetch("sample.flac")).blob(),
|
|
47
|
-
model: "openai/whisper-large-v3",
|
|
48
|
-
});
|
|
49
|
-
```
|
|
50
|
-
|
|
51
|
-
For transformers-compatible models like Whisper, Wav2Vec2, and HuBERT, you can also run inference with the library as follows:
|
|
52
|
-
|
|
53
|
-
```python
|
|
54
|
-
# pip install --upgrade transformers
|
|
55
|
-
|
|
56
|
-
from transformers import pipeline
|
|
57
|
-
|
|
58
|
-
pipe = pipeline("automatic-speech-recognition", "openai/whisper-large-v3")
|
|
59
|
-
|
|
60
|
-
pipe("sample.flac")
|
|
61
|
-
# {'text': "GOING ALONG SLUSHY COUNTRY ROADS AND SPEAKING TO DAMP AUDIENCES IN DRAUGHTY SCHOOL ROOMS DAY AFTER DAY FOR A FORTNIGHT HE'LL HAVE TO PUT IN AN APPEARANCE AT SOME PLACE OF WORSHIP ON SUNDAY MORNING AND HE CAN COME TO US IMMEDIATELY AFTERWARDS"}
|
|
62
|
-
```
|
|
63
|
-
|
|
64
|
-
## Solving ASR for your own data
|
|
65
|
-
|
|
66
|
-
We have some great news! You can fine-tune (transfer learning) a foundational speech model on a specific language without tonnes of data. Pretrained models such as Whisper, Wav2Vec2-MMS and HuBERT exist. [OpenAI's Whisper model](https://huggingface.co/openai/whisper-large-v3) is a large multilingual model trained on 100+ languages and with 4 Million hours of speech.
|
|
67
|
-
|
|
68
|
-
The following detailed [blog post](https://huggingface.co/blog/fine-tune-whisper) shows how to fine-tune a pre-trained Whisper checkpoint on labeled data for ASR. With the right data and strategy you can fine-tune a high-performant model on a free Google Colab instance too. We suggest to read the blog post for more info!
|
|
69
|
-
|
|
70
|
-
## Hugging Face Whisper Event
|
|
71
|
-
|
|
72
|
-
On December 2022, over 450 participants collaborated, fine-tuned and shared 600+ ASR Whisper models in 100+ different languages. You can compare these models on the event's speech recognition [leaderboard](https://huggingface.co/spaces/whisper-event/leaderboard?dataset=mozilla-foundation%2Fcommon_voice_11_0&config=ar&split=test).
|
|
73
|
-
|
|
74
|
-
These events help democratize ASR for all languages, including low-resource languages. In addition to the trained models, the [event](https://github.com/huggingface/community-events/tree/main/whisper-fine-tuning-event) helps to build practical collaborative knowledge.
|
|
75
|
-
|
|
76
|
-
## Useful Resources
|
|
77
|
-
|
|
78
|
-
- [Hugging Face Audio Course](https://huggingface.co/learn/audio-course/chapter5/introduction)
|
|
79
|
-
- [Fine-tuning MetaAI's MMS Adapter Models for Multi-Lingual ASR](https://huggingface.co/blog/mms_adapters)
|
|
80
|
-
- [Making automatic speech recognition work on large files with Wav2Vec2 in 🤗 Transformers](https://huggingface.co/blog/asr-chunking)
|
|
81
|
-
- [Boosting Wav2Vec2 with n-grams in 🤗 Transformers](https://huggingface.co/blog/wav2vec2-with-ngram)
|
|
82
|
-
- [ML for Audio Study Group - Intro to Audio and ASR Deep Dive](https://www.youtube.com/watch?v=D-MH6YjuIlE)
|
|
83
|
-
- [Massively Multilingual ASR: 50 Languages, 1 Model, 1 Billion Parameters](https://arxiv.org/pdf/2007.03001.pdf)
|
|
84
|
-
- An ASR toolkit made by [NVIDIA: NeMo](https://github.com/NVIDIA/NeMo) with code and pretrained models useful for new ASR models. Watch the [introductory video](https://www.youtube.com/embed/wBgpMf_KQVw) for an overview.
|
|
85
|
-
- [An introduction to SpeechT5, a multi-purpose speech recognition and synthesis model](https://huggingface.co/blog/speecht5)
|
|
86
|
-
- [Fine-tune Whisper For Multilingual ASR with 🤗Transformers](https://huggingface.co/blog/fine-tune-whisper)
|
|
87
|
-
- [Automatic speech recognition task guide](https://huggingface.co/docs/transformers/tasks/asr)
|
|
88
|
-
- [Speech Synthesis, Recognition, and More With SpeechT5](https://huggingface.co/blog/speecht5)
|
|
89
|
-
- [Fine-Tune W2V2-Bert for low-resource ASR with 🤗 Transformers](https://huggingface.co/blog/fine-tune-w2v2-bert)
|
|
90
|
-
- [Speculative Decoding for 2x Faster Whisper Inference](https://huggingface.co/blog/whisper-speculative-decoding)
|
|
@@ -1,82 +0,0 @@
|
|
|
1
|
-
import type { TaskDataCustom } from "..";
|
|
2
|
-
|
|
3
|
-
const taskData: TaskDataCustom = {
|
|
4
|
-
datasets: [
|
|
5
|
-
{
|
|
6
|
-
description: "31,175 hours of multilingual audio-text dataset in 108 languages.",
|
|
7
|
-
id: "mozilla-foundation/common_voice_17_0",
|
|
8
|
-
},
|
|
9
|
-
{
|
|
10
|
-
description: "A dataset with 44.6k hours of English speaker data and 6k hours of other language speakers.",
|
|
11
|
-
id: "parler-tts/mls_eng",
|
|
12
|
-
},
|
|
13
|
-
{
|
|
14
|
-
description: "A multi-lingual audio dataset with 370K hours of audio.",
|
|
15
|
-
id: "espnet/yodas",
|
|
16
|
-
},
|
|
17
|
-
],
|
|
18
|
-
demo: {
|
|
19
|
-
inputs: [
|
|
20
|
-
{
|
|
21
|
-
filename: "input.flac",
|
|
22
|
-
type: "audio",
|
|
23
|
-
},
|
|
24
|
-
],
|
|
25
|
-
outputs: [
|
|
26
|
-
{
|
|
27
|
-
/// GOING ALONG SLUSHY COUNTRY ROADS AND SPEAKING TO DAMP AUDIENCES I
|
|
28
|
-
label: "Transcript",
|
|
29
|
-
content: "Going along slushy country roads and speaking to damp audiences in...",
|
|
30
|
-
type: "text",
|
|
31
|
-
},
|
|
32
|
-
],
|
|
33
|
-
},
|
|
34
|
-
metrics: [
|
|
35
|
-
{
|
|
36
|
-
description: "",
|
|
37
|
-
id: "wer",
|
|
38
|
-
},
|
|
39
|
-
{
|
|
40
|
-
description: "",
|
|
41
|
-
id: "cer",
|
|
42
|
-
},
|
|
43
|
-
],
|
|
44
|
-
models: [
|
|
45
|
-
{
|
|
46
|
-
description: "A powerful ASR model by OpenAI.",
|
|
47
|
-
id: "openai/whisper-large-v3",
|
|
48
|
-
},
|
|
49
|
-
{
|
|
50
|
-
description: "A good generic speech model by MetaAI for fine-tuning.",
|
|
51
|
-
id: "facebook/w2v-bert-2.0",
|
|
52
|
-
},
|
|
53
|
-
{
|
|
54
|
-
description: "An end-to-end model that performs ASR and Speech Translation by MetaAI.",
|
|
55
|
-
id: "facebook/seamless-m4t-v2-large",
|
|
56
|
-
},
|
|
57
|
-
{
|
|
58
|
-
description: "Powerful speaker diarization model.",
|
|
59
|
-
id: "pyannote/speaker-diarization-3.1",
|
|
60
|
-
},
|
|
61
|
-
],
|
|
62
|
-
spaces: [
|
|
63
|
-
{
|
|
64
|
-
description: "A powerful general-purpose speech recognition application.",
|
|
65
|
-
id: "hf-audio/whisper-large-v3",
|
|
66
|
-
},
|
|
67
|
-
{
|
|
68
|
-
description: "Fastest speech recognition application.",
|
|
69
|
-
id: "sanchit-gandhi/whisper-jax",
|
|
70
|
-
},
|
|
71
|
-
{
|
|
72
|
-
description: "A high quality speech and text translation model by Meta.",
|
|
73
|
-
id: "facebook/seamless_m4t",
|
|
74
|
-
},
|
|
75
|
-
],
|
|
76
|
-
summary:
|
|
77
|
-
"Automatic Speech Recognition (ASR), also known as Speech to Text (STT), is the task of transcribing a given audio to text. It has many applications, such as voice user interfaces.",
|
|
78
|
-
widgetModels: ["openai/whisper-large-v3"],
|
|
79
|
-
youtubeId: "TksaY_FDgnk",
|
|
80
|
-
};
|
|
81
|
-
|
|
82
|
-
export default taskData;
|