@huggingface/tasks 0.13.0-test2 → 0.13.0-test3
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/dataset-libraries.d.cts +87 -0
- package/dist/dataset-libraries.d.cts.map +1 -0
- package/dist/dataset-libraries.d.ts +87 -0
- package/dist/dataset-libraries.d.ts.map +1 -0
- package/dist/default-widget-inputs.d.cts +6 -0
- package/dist/default-widget-inputs.d.cts.map +1 -0
- package/dist/default-widget-inputs.d.ts +6 -0
- package/dist/default-widget-inputs.d.ts.map +1 -0
- package/dist/gguf.d.cts +35 -0
- package/dist/gguf.d.cts.map +1 -0
- package/dist/gguf.d.ts +35 -0
- package/dist/gguf.d.ts.map +1 -0
- package/dist/hardware.d.cts +478 -0
- package/dist/hardware.d.cts.map +1 -0
- package/dist/hardware.d.ts +478 -0
- package/dist/hardware.d.ts.map +1 -0
- package/dist/index.d.cts +21 -4778
- package/dist/index.d.cts.map +1 -0
- package/dist/index.d.ts +21 -4778
- package/dist/index.d.ts.map +1 -0
- package/dist/library-to-tasks.d.cts +11 -0
- package/dist/library-to-tasks.d.cts.map +1 -0
- package/dist/library-to-tasks.d.ts +11 -0
- package/dist/library-to-tasks.d.ts.map +1 -0
- package/dist/local-apps.d.cts +195 -0
- package/dist/local-apps.d.cts.map +1 -0
- package/dist/local-apps.d.ts +195 -0
- package/dist/local-apps.d.ts.map +1 -0
- package/dist/model-data.d.cts +146 -0
- package/dist/model-data.d.cts.map +1 -0
- package/dist/model-data.d.ts +146 -0
- package/dist/model-data.d.ts.map +1 -0
- package/dist/model-libraries-downloads.d.cts +18 -0
- package/dist/model-libraries-downloads.d.cts.map +1 -0
- package/dist/model-libraries-downloads.d.ts +18 -0
- package/dist/model-libraries-downloads.d.ts.map +1 -0
- package/dist/model-libraries-snippets.d.cts +72 -0
- package/dist/model-libraries-snippets.d.cts.map +1 -0
- package/dist/model-libraries-snippets.d.ts +72 -0
- package/dist/model-libraries-snippets.d.ts.map +1 -0
- package/dist/model-libraries.d.cts +804 -0
- package/dist/model-libraries.d.cts.map +1 -0
- package/dist/model-libraries.d.ts +804 -0
- package/dist/model-libraries.d.ts.map +1 -0
- package/dist/pipelines.d.cts +425 -0
- package/dist/pipelines.d.cts.map +1 -0
- package/dist/pipelines.d.ts +425 -0
- package/dist/pipelines.d.ts.map +1 -0
- package/dist/snippets/common.d.cts +14 -0
- package/dist/snippets/common.d.cts.map +1 -0
- package/dist/snippets/common.d.ts +14 -0
- package/dist/snippets/common.d.ts.map +1 -0
- package/dist/snippets/curl.d.cts +17 -0
- package/dist/snippets/curl.d.cts.map +1 -0
- package/dist/snippets/curl.d.ts +17 -0
- package/dist/snippets/curl.d.ts.map +1 -0
- package/dist/snippets/curl.spec.d.cts +2 -0
- package/dist/snippets/curl.spec.d.cts.map +1 -0
- package/dist/snippets/curl.spec.d.ts +2 -0
- package/dist/snippets/curl.spec.d.ts.map +1 -0
- package/dist/snippets/index.d.cts +6 -0
- package/dist/snippets/index.d.cts.map +1 -0
- package/dist/snippets/index.d.ts +6 -0
- package/dist/snippets/index.d.ts.map +1 -0
- package/dist/snippets/inputs.d.cts +4 -0
- package/dist/snippets/inputs.d.cts.map +1 -0
- package/dist/snippets/inputs.d.ts +4 -0
- package/dist/snippets/inputs.d.ts.map +1 -0
- package/dist/snippets/js.d.cts +19 -0
- package/dist/snippets/js.d.cts.map +1 -0
- package/dist/snippets/js.d.ts +19 -0
- package/dist/snippets/js.d.ts.map +1 -0
- package/dist/snippets/js.spec.d.cts +2 -0
- package/dist/snippets/js.spec.d.cts.map +1 -0
- package/dist/snippets/js.spec.d.ts +2 -0
- package/dist/snippets/js.spec.d.ts.map +1 -0
- package/dist/snippets/python.d.cts +22 -0
- package/dist/snippets/python.d.cts.map +1 -0
- package/dist/snippets/python.d.ts +22 -0
- package/dist/snippets/python.d.ts.map +1 -0
- package/dist/snippets/python.spec.d.cts +2 -0
- package/dist/snippets/python.spec.d.cts.map +1 -0
- package/dist/snippets/python.spec.d.ts +2 -0
- package/dist/snippets/python.spec.d.ts.map +1 -0
- package/dist/snippets/types.d.cts +12 -0
- package/dist/snippets/types.d.cts.map +1 -0
- package/dist/snippets/types.d.ts +12 -0
- package/dist/snippets/types.d.ts.map +1 -0
- package/dist/tasks/audio-classification/data.d.cts +4 -0
- package/dist/tasks/audio-classification/data.d.cts.map +1 -0
- package/dist/tasks/audio-classification/data.d.ts +4 -0
- package/dist/tasks/audio-classification/data.d.ts.map +1 -0
- package/dist/tasks/audio-classification/inference.d.cts +53 -0
- package/dist/tasks/audio-classification/inference.d.cts.map +1 -0
- package/dist/tasks/audio-classification/inference.d.ts +53 -0
- package/dist/tasks/audio-classification/inference.d.ts.map +1 -0
- package/dist/tasks/audio-to-audio/data.d.cts +4 -0
- package/dist/tasks/audio-to-audio/data.d.cts.map +1 -0
- package/dist/tasks/audio-to-audio/data.d.ts +4 -0
- package/dist/tasks/audio-to-audio/data.d.ts.map +1 -0
- package/dist/tasks/automatic-speech-recognition/data.d.cts +4 -0
- package/dist/tasks/automatic-speech-recognition/data.d.cts.map +1 -0
- package/dist/tasks/automatic-speech-recognition/data.d.ts +4 -0
- package/dist/tasks/automatic-speech-recognition/data.d.ts.map +1 -0
- package/dist/tasks/automatic-speech-recognition/inference.d.cts +155 -0
- package/dist/tasks/automatic-speech-recognition/inference.d.cts.map +1 -0
- package/dist/tasks/automatic-speech-recognition/inference.d.ts +155 -0
- package/dist/tasks/automatic-speech-recognition/inference.d.ts.map +1 -0
- package/dist/tasks/chat-completion/inference.d.cts +291 -0
- package/dist/tasks/chat-completion/inference.d.cts.map +1 -0
- package/dist/tasks/chat-completion/inference.d.ts +291 -0
- package/dist/tasks/chat-completion/inference.d.ts.map +1 -0
- package/dist/tasks/depth-estimation/data.d.cts +4 -0
- package/dist/tasks/depth-estimation/data.d.cts.map +1 -0
- package/dist/tasks/depth-estimation/data.d.ts +4 -0
- package/dist/tasks/depth-estimation/data.d.ts.map +1 -0
- package/dist/tasks/depth-estimation/inference.d.cts +36 -0
- package/dist/tasks/depth-estimation/inference.d.cts.map +1 -0
- package/dist/tasks/depth-estimation/inference.d.ts +36 -0
- package/dist/tasks/depth-estimation/inference.d.ts.map +1 -0
- package/dist/tasks/document-question-answering/data.d.cts +4 -0
- package/dist/tasks/document-question-answering/data.d.cts.map +1 -0
- package/dist/tasks/document-question-answering/data.d.ts +4 -0
- package/dist/tasks/document-question-answering/data.d.ts.map +1 -0
- package/dist/tasks/document-question-answering/inference.d.cts +111 -0
- package/dist/tasks/document-question-answering/inference.d.cts.map +1 -0
- package/dist/tasks/document-question-answering/inference.d.ts +111 -0
- package/dist/tasks/document-question-answering/inference.d.ts.map +1 -0
- package/dist/tasks/feature-extraction/data.d.cts +4 -0
- package/dist/tasks/feature-extraction/data.d.cts.map +1 -0
- package/dist/tasks/feature-extraction/data.d.ts +4 -0
- package/dist/tasks/feature-extraction/data.d.ts.map +1 -0
- package/dist/tasks/feature-extraction/inference.d.cts +38 -0
- package/dist/tasks/feature-extraction/inference.d.cts.map +1 -0
- package/dist/tasks/feature-extraction/inference.d.ts +38 -0
- package/dist/tasks/feature-extraction/inference.d.ts.map +1 -0
- package/dist/tasks/fill-mask/data.d.cts +4 -0
- package/dist/tasks/fill-mask/data.d.cts.map +1 -0
- package/dist/tasks/fill-mask/data.d.ts +4 -0
- package/dist/tasks/fill-mask/data.d.ts.map +1 -0
- package/dist/tasks/fill-mask/inference.d.cts +63 -0
- package/dist/tasks/fill-mask/inference.d.cts.map +1 -0
- package/dist/tasks/fill-mask/inference.d.ts +63 -0
- package/dist/tasks/fill-mask/inference.d.ts.map +1 -0
- package/dist/tasks/image-classification/data.d.cts +4 -0
- package/dist/tasks/image-classification/data.d.cts.map +1 -0
- package/dist/tasks/image-classification/data.d.ts +4 -0
- package/dist/tasks/image-classification/data.d.ts.map +1 -0
- package/dist/tasks/image-classification/inference.d.cts +53 -0
- package/dist/tasks/image-classification/inference.d.cts.map +1 -0
- package/dist/tasks/image-classification/inference.d.ts +53 -0
- package/dist/tasks/image-classification/inference.d.ts.map +1 -0
- package/dist/tasks/image-feature-extraction/data.d.cts +4 -0
- package/dist/tasks/image-feature-extraction/data.d.cts.map +1 -0
- package/dist/tasks/image-feature-extraction/data.d.ts +4 -0
- package/dist/tasks/image-feature-extraction/data.d.ts.map +1 -0
- package/dist/tasks/image-segmentation/data.d.cts +4 -0
- package/dist/tasks/image-segmentation/data.d.cts.map +1 -0
- package/dist/tasks/image-segmentation/data.d.ts +4 -0
- package/dist/tasks/image-segmentation/data.d.ts.map +1 -0
- package/dist/tasks/image-segmentation/inference.d.cts +70 -0
- package/dist/tasks/image-segmentation/inference.d.cts.map +1 -0
- package/dist/tasks/image-segmentation/inference.d.ts +70 -0
- package/dist/tasks/image-segmentation/inference.d.ts.map +1 -0
- package/dist/tasks/image-text-to-text/data.d.cts +4 -0
- package/dist/tasks/image-text-to-text/data.d.cts.map +1 -0
- package/dist/tasks/image-text-to-text/data.d.ts +4 -0
- package/dist/tasks/image-text-to-text/data.d.ts.map +1 -0
- package/dist/tasks/image-to-3d/data.d.cts +4 -0
- package/dist/tasks/image-to-3d/data.d.cts.map +1 -0
- package/dist/tasks/image-to-3d/data.d.ts +4 -0
- package/dist/tasks/image-to-3d/data.d.ts.map +1 -0
- package/dist/tasks/image-to-image/data.d.cts +4 -0
- package/dist/tasks/image-to-image/data.d.cts.map +1 -0
- package/dist/tasks/image-to-image/data.d.ts +4 -0
- package/dist/tasks/image-to-image/data.d.ts.map +1 -0
- package/dist/tasks/image-to-image/inference.d.cts +65 -0
- package/dist/tasks/image-to-image/inference.d.cts.map +1 -0
- package/dist/tasks/image-to-image/inference.d.ts +65 -0
- package/dist/tasks/image-to-image/inference.d.ts.map +1 -0
- package/dist/tasks/image-to-text/data.d.cts +4 -0
- package/dist/tasks/image-to-text/data.d.cts.map +1 -0
- package/dist/tasks/image-to-text/data.d.ts +4 -0
- package/dist/tasks/image-to-text/data.d.ts.map +1 -0
- package/dist/tasks/image-to-text/inference.d.cts +139 -0
- package/dist/tasks/image-to-text/inference.d.cts.map +1 -0
- package/dist/tasks/image-to-text/inference.d.ts +139 -0
- package/dist/tasks/image-to-text/inference.d.ts.map +1 -0
- package/dist/tasks/index.d.cts +87 -0
- package/dist/tasks/index.d.cts.map +1 -0
- package/dist/tasks/index.d.ts +87 -0
- package/dist/tasks/index.d.ts.map +1 -0
- package/dist/tasks/keypoint-detection/data.d.cts +4 -0
- package/dist/tasks/keypoint-detection/data.d.cts.map +1 -0
- package/dist/tasks/keypoint-detection/data.d.ts +4 -0
- package/dist/tasks/keypoint-detection/data.d.ts.map +1 -0
- package/dist/tasks/mask-generation/data.d.cts +4 -0
- package/dist/tasks/mask-generation/data.d.cts.map +1 -0
- package/dist/tasks/mask-generation/data.d.ts +4 -0
- package/dist/tasks/mask-generation/data.d.ts.map +1 -0
- package/dist/tasks/object-detection/data.d.cts +4 -0
- package/dist/tasks/object-detection/data.d.cts.map +1 -0
- package/dist/tasks/object-detection/data.d.ts +4 -0
- package/dist/tasks/object-detection/data.d.ts.map +1 -0
- package/dist/tasks/object-detection/inference.d.cts +76 -0
- package/dist/tasks/object-detection/inference.d.cts.map +1 -0
- package/dist/tasks/object-detection/inference.d.ts +76 -0
- package/dist/tasks/object-detection/inference.d.ts.map +1 -0
- package/dist/tasks/placeholder/data.d.cts +4 -0
- package/dist/tasks/placeholder/data.d.cts.map +1 -0
- package/dist/tasks/placeholder/data.d.ts +4 -0
- package/dist/tasks/placeholder/data.d.ts.map +1 -0
- package/dist/tasks/question-answering/data.d.cts +4 -0
- package/dist/tasks/question-answering/data.d.cts.map +1 -0
- package/dist/tasks/question-answering/data.d.ts +4 -0
- package/dist/tasks/question-answering/data.d.ts.map +1 -0
- package/dist/tasks/question-answering/inference.d.cts +100 -0
- package/dist/tasks/question-answering/inference.d.cts.map +1 -0
- package/dist/tasks/question-answering/inference.d.ts +100 -0
- package/dist/tasks/question-answering/inference.d.ts.map +1 -0
- package/dist/tasks/reinforcement-learning/data.d.cts +4 -0
- package/dist/tasks/reinforcement-learning/data.d.cts.map +1 -0
- package/dist/tasks/reinforcement-learning/data.d.ts +4 -0
- package/dist/tasks/reinforcement-learning/data.d.ts.map +1 -0
- package/dist/tasks/sentence-similarity/data.d.cts +4 -0
- package/dist/tasks/sentence-similarity/data.d.cts.map +1 -0
- package/dist/tasks/sentence-similarity/data.d.ts +4 -0
- package/dist/tasks/sentence-similarity/data.d.ts.map +1 -0
- package/dist/tasks/sentence-similarity/inference.d.cts +32 -0
- package/dist/tasks/sentence-similarity/inference.d.cts.map +1 -0
- package/dist/tasks/sentence-similarity/inference.d.ts +32 -0
- package/dist/tasks/sentence-similarity/inference.d.ts.map +1 -0
- package/dist/tasks/summarization/data.d.cts +4 -0
- package/dist/tasks/summarization/data.d.cts.map +1 -0
- package/dist/tasks/summarization/data.d.ts +4 -0
- package/dist/tasks/summarization/data.d.ts.map +1 -0
- package/dist/tasks/summarization/inference.d.cts +56 -0
- package/dist/tasks/summarization/inference.d.cts.map +1 -0
- package/dist/tasks/summarization/inference.d.ts +56 -0
- package/dist/tasks/summarization/inference.d.ts.map +1 -0
- package/dist/tasks/table-question-answering/data.d.cts +4 -0
- package/dist/tasks/table-question-answering/data.d.cts.map +1 -0
- package/dist/tasks/table-question-answering/data.d.ts +4 -0
- package/dist/tasks/table-question-answering/data.d.ts.map +1 -0
- package/dist/tasks/table-question-answering/inference.d.cts +62 -0
- package/dist/tasks/table-question-answering/inference.d.cts.map +1 -0
- package/dist/tasks/table-question-answering/inference.d.ts +62 -0
- package/dist/tasks/table-question-answering/inference.d.ts.map +1 -0
- package/dist/tasks/tabular-classification/data.d.cts +4 -0
- package/dist/tasks/tabular-classification/data.d.cts.map +1 -0
- package/dist/tasks/tabular-classification/data.d.ts +4 -0
- package/dist/tasks/tabular-classification/data.d.ts.map +1 -0
- package/dist/tasks/tabular-regression/data.d.cts +4 -0
- package/dist/tasks/tabular-regression/data.d.cts.map +1 -0
- package/dist/tasks/tabular-regression/data.d.ts +4 -0
- package/dist/tasks/tabular-regression/data.d.ts.map +1 -0
- package/dist/tasks/text-classification/data.d.cts +4 -0
- package/dist/tasks/text-classification/data.d.cts.map +1 -0
- package/dist/tasks/text-classification/data.d.ts +4 -0
- package/dist/tasks/text-classification/data.d.ts.map +1 -0
- package/dist/tasks/text-classification/inference.d.cts +52 -0
- package/dist/tasks/text-classification/inference.d.cts.map +1 -0
- package/dist/tasks/text-classification/inference.d.ts +52 -0
- package/dist/tasks/text-classification/inference.d.ts.map +1 -0
- package/dist/tasks/text-generation/data.d.cts +4 -0
- package/dist/tasks/text-generation/data.d.cts.map +1 -0
- package/dist/tasks/text-generation/data.d.ts +4 -0
- package/dist/tasks/text-generation/data.d.ts.map +1 -0
- package/dist/tasks/text-generation/inference.d.cts +188 -0
- package/dist/tasks/text-generation/inference.d.cts.map +1 -0
- package/dist/tasks/text-generation/inference.d.ts +188 -0
- package/dist/tasks/text-generation/inference.d.ts.map +1 -0
- package/dist/tasks/text-to-3d/data.d.cts +4 -0
- package/dist/tasks/text-to-3d/data.d.cts.map +1 -0
- package/dist/tasks/text-to-3d/data.d.ts +4 -0
- package/dist/tasks/text-to-3d/data.d.ts.map +1 -0
- package/dist/tasks/text-to-audio/inference.d.cts +139 -0
- package/dist/tasks/text-to-audio/inference.d.cts.map +1 -0
- package/dist/tasks/text-to-audio/inference.d.ts +139 -0
- package/dist/tasks/text-to-audio/inference.d.ts.map +1 -0
- package/dist/tasks/text-to-image/data.d.cts +4 -0
- package/dist/tasks/text-to-image/data.d.cts.map +1 -0
- package/dist/tasks/text-to-image/data.d.ts +4 -0
- package/dist/tasks/text-to-image/data.d.ts.map +1 -0
- package/dist/tasks/text-to-image/inference.d.cts +72 -0
- package/dist/tasks/text-to-image/inference.d.cts.map +1 -0
- package/dist/tasks/text-to-image/inference.d.ts +72 -0
- package/dist/tasks/text-to-image/inference.d.ts.map +1 -0
- package/dist/tasks/text-to-speech/data.d.cts +4 -0
- package/dist/tasks/text-to-speech/data.d.cts.map +1 -0
- package/dist/tasks/text-to-speech/data.d.ts +4 -0
- package/dist/tasks/text-to-speech/data.d.ts.map +1 -0
- package/dist/tasks/text-to-speech/inference.d.cts +141 -0
- package/dist/tasks/text-to-speech/inference.d.cts.map +1 -0
- package/dist/tasks/text-to-speech/inference.d.ts +141 -0
- package/dist/tasks/text-to-speech/inference.d.ts.map +1 -0
- package/dist/tasks/text-to-video/data.d.cts +4 -0
- package/dist/tasks/text-to-video/data.d.cts.map +1 -0
- package/dist/tasks/text-to-video/data.d.ts +4 -0
- package/dist/tasks/text-to-video/data.d.ts.map +1 -0
- package/dist/tasks/text2text-generation/inference.d.cts +54 -0
- package/dist/tasks/text2text-generation/inference.d.cts.map +1 -0
- package/dist/tasks/text2text-generation/inference.d.ts +54 -0
- package/dist/tasks/text2text-generation/inference.d.ts.map +1 -0
- package/dist/tasks/token-classification/data.d.cts +4 -0
- package/dist/tasks/token-classification/data.d.cts.map +1 -0
- package/dist/tasks/token-classification/data.d.ts +4 -0
- package/dist/tasks/token-classification/data.d.ts.map +1 -0
- package/dist/tasks/token-classification/inference.d.cts +86 -0
- package/dist/tasks/token-classification/inference.d.cts.map +1 -0
- package/dist/tasks/token-classification/inference.d.ts +86 -0
- package/dist/tasks/token-classification/inference.d.ts.map +1 -0
- package/dist/tasks/translation/data.d.cts +4 -0
- package/dist/tasks/translation/data.d.cts.map +1 -0
- package/dist/tasks/translation/data.d.ts +4 -0
- package/dist/tasks/translation/data.d.ts.map +1 -0
- package/dist/tasks/translation/inference.d.cts +66 -0
- package/dist/tasks/translation/inference.d.cts.map +1 -0
- package/dist/tasks/translation/inference.d.ts +66 -0
- package/dist/tasks/translation/inference.d.ts.map +1 -0
- package/dist/tasks/unconditional-image-generation/data.d.cts +4 -0
- package/dist/tasks/unconditional-image-generation/data.d.cts.map +1 -0
- package/dist/tasks/unconditional-image-generation/data.d.ts +4 -0
- package/dist/tasks/unconditional-image-generation/data.d.ts.map +1 -0
- package/dist/tasks/video-classification/data.d.cts +4 -0
- package/dist/tasks/video-classification/data.d.cts.map +1 -0
- package/dist/tasks/video-classification/data.d.ts +4 -0
- package/dist/tasks/video-classification/data.d.ts.map +1 -0
- package/dist/tasks/video-classification/inference.d.cts +60 -0
- package/dist/tasks/video-classification/inference.d.cts.map +1 -0
- package/dist/tasks/video-classification/inference.d.ts +60 -0
- package/dist/tasks/video-classification/inference.d.ts.map +1 -0
- package/dist/tasks/video-text-to-text/data.d.cts +4 -0
- package/dist/tasks/video-text-to-text/data.d.cts.map +1 -0
- package/dist/tasks/video-text-to-text/data.d.ts +4 -0
- package/dist/tasks/video-text-to-text/data.d.ts.map +1 -0
- package/dist/tasks/visual-question-answering/data.d.cts +4 -0
- package/dist/tasks/visual-question-answering/data.d.cts.map +1 -0
- package/dist/tasks/visual-question-answering/data.d.ts +4 -0
- package/dist/tasks/visual-question-answering/data.d.ts.map +1 -0
- package/dist/tasks/visual-question-answering/inference.d.cts +63 -0
- package/dist/tasks/visual-question-answering/inference.d.cts.map +1 -0
- package/dist/tasks/visual-question-answering/inference.d.ts +63 -0
- package/dist/tasks/visual-question-answering/inference.d.ts.map +1 -0
- package/dist/tasks/zero-shot-classification/data.d.cts +4 -0
- package/dist/tasks/zero-shot-classification/data.d.cts.map +1 -0
- package/dist/tasks/zero-shot-classification/data.d.ts +4 -0
- package/dist/tasks/zero-shot-classification/data.d.ts.map +1 -0
- package/dist/tasks/zero-shot-classification/inference.d.cts +68 -0
- package/dist/tasks/zero-shot-classification/inference.d.cts.map +1 -0
- package/dist/tasks/zero-shot-classification/inference.d.ts +68 -0
- package/dist/tasks/zero-shot-classification/inference.d.ts.map +1 -0
- package/dist/tasks/zero-shot-image-classification/data.d.cts +4 -0
- package/dist/tasks/zero-shot-image-classification/data.d.cts.map +1 -0
- package/dist/tasks/zero-shot-image-classification/data.d.ts +4 -0
- package/dist/tasks/zero-shot-image-classification/data.d.ts.map +1 -0
- package/dist/tasks/zero-shot-image-classification/inference.d.cts +62 -0
- package/dist/tasks/zero-shot-image-classification/inference.d.cts.map +1 -0
- package/dist/tasks/zero-shot-image-classification/inference.d.ts +62 -0
- package/dist/tasks/zero-shot-image-classification/inference.d.ts.map +1 -0
- package/dist/tasks/zero-shot-object-detection/data.d.cts +4 -0
- package/dist/tasks/zero-shot-object-detection/data.d.cts.map +1 -0
- package/dist/tasks/zero-shot-object-detection/data.d.ts +4 -0
- package/dist/tasks/zero-shot-object-detection/data.d.ts.map +1 -0
- package/dist/tasks/zero-shot-object-detection/inference.d.cts +67 -0
- package/dist/tasks/zero-shot-object-detection/inference.d.cts.map +1 -0
- package/dist/tasks/zero-shot-object-detection/inference.d.ts +67 -0
- package/dist/tasks/zero-shot-object-detection/inference.d.ts.map +1 -0
- package/dist/tokenizer-data.d.cts +26 -0
- package/dist/tokenizer-data.d.cts.map +1 -0
- package/dist/tokenizer-data.d.ts +26 -0
- package/dist/tokenizer-data.d.ts.map +1 -0
- package/dist/widget-example.d.cts +83 -0
- package/dist/widget-example.d.cts.map +1 -0
- package/dist/widget-example.d.ts +83 -0
- package/dist/widget-example.d.ts.map +1 -0
- package/package.json +5 -2
- package/tsconfig.json +1 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"data.d.ts","sourceRoot":"","sources":["../../../src/tasks/zero-shot-object-detection/data.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,IAAI,CAAC;AAEzC,QAAA,MAAM,QAAQ,EAAE,cA8Df,CAAC;AAEF,eAAe,QAAQ,CAAC"}
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Inference code generated from the JSON schema spec in ./spec
|
|
3
|
+
*
|
|
4
|
+
* Using src/scripts/inference-codegen
|
|
5
|
+
*/
|
|
6
|
+
/**
|
|
7
|
+
* Inputs for Zero Shot Object Detection inference
|
|
8
|
+
*/
|
|
9
|
+
export interface ZeroShotObjectDetectionInput {
|
|
10
|
+
/**
|
|
11
|
+
* The input image data, with candidate labels
|
|
12
|
+
*/
|
|
13
|
+
inputs: ZeroShotObjectDetectionInputData;
|
|
14
|
+
/**
|
|
15
|
+
* Additional inference parameters
|
|
16
|
+
*/
|
|
17
|
+
parameters?: {
|
|
18
|
+
[key: string]: unknown;
|
|
19
|
+
};
|
|
20
|
+
[property: string]: unknown;
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* The input image data, with candidate labels
|
|
24
|
+
*/
|
|
25
|
+
export interface ZeroShotObjectDetectionInputData {
|
|
26
|
+
/**
|
|
27
|
+
* The candidate labels for this image
|
|
28
|
+
*/
|
|
29
|
+
candidateLabels: string[];
|
|
30
|
+
/**
|
|
31
|
+
* The image data to generate bounding boxes from
|
|
32
|
+
*/
|
|
33
|
+
image: unknown;
|
|
34
|
+
[property: string]: unknown;
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* The predicted bounding box. Coordinates are relative to the top left corner of the input
|
|
38
|
+
* image.
|
|
39
|
+
*/
|
|
40
|
+
export interface BoundingBox {
|
|
41
|
+
xmax: number;
|
|
42
|
+
xmin: number;
|
|
43
|
+
ymax: number;
|
|
44
|
+
ymin: number;
|
|
45
|
+
[property: string]: unknown;
|
|
46
|
+
}
|
|
47
|
+
export type ZeroShotObjectDetectionOutput = ZeroShotObjectDetectionOutputElement[];
|
|
48
|
+
/**
|
|
49
|
+
* Outputs of inference for the Zero Shot Object Detection task
|
|
50
|
+
*/
|
|
51
|
+
export interface ZeroShotObjectDetectionOutputElement {
|
|
52
|
+
/**
|
|
53
|
+
* The predicted bounding box. Coordinates are relative to the top left corner of the input
|
|
54
|
+
* image.
|
|
55
|
+
*/
|
|
56
|
+
box: BoundingBox;
|
|
57
|
+
/**
|
|
58
|
+
* A candidate label
|
|
59
|
+
*/
|
|
60
|
+
label: string;
|
|
61
|
+
/**
|
|
62
|
+
* The associated score / probability
|
|
63
|
+
*/
|
|
64
|
+
score: number;
|
|
65
|
+
[property: string]: unknown;
|
|
66
|
+
}
|
|
67
|
+
//# sourceMappingURL=inference.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"inference.d.cts","sourceRoot":"","sources":["../../../src/tasks/zero-shot-object-detection/inference.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH;;GAEG;AACH,MAAM,WAAW,4BAA4B;IAC5C;;OAEG;IACH,MAAM,EAAE,gCAAgC,CAAC;IACzC;;OAEG;IACH,UAAU,CAAC,EAAE;QACZ,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;KACvB,CAAC;IACF,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC;CAC5B;AACD;;GAEG;AACH,MAAM,WAAW,gCAAgC;IAChD;;OAEG;IACH,eAAe,EAAE,MAAM,EAAE,CAAC;IAC1B;;OAEG;IACH,KAAK,EAAE,OAAO,CAAC;IACf,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC;CAC5B;AACD;;;GAGG;AACH,MAAM,WAAW,WAAW;IAC3B,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC;CAC5B;AACD,MAAM,MAAM,6BAA6B,GAAG,oCAAoC,EAAE,CAAC;AACnF;;GAEG;AACH,MAAM,WAAW,oCAAoC;IACpD;;;OAGG;IACH,GAAG,EAAE,WAAW,CAAC;IACjB;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IACd;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IACd,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC;CAC5B"}
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Inference code generated from the JSON schema spec in ./spec
|
|
3
|
+
*
|
|
4
|
+
* Using src/scripts/inference-codegen
|
|
5
|
+
*/
|
|
6
|
+
/**
|
|
7
|
+
* Inputs for Zero Shot Object Detection inference
|
|
8
|
+
*/
|
|
9
|
+
export interface ZeroShotObjectDetectionInput {
|
|
10
|
+
/**
|
|
11
|
+
* The input image data, with candidate labels
|
|
12
|
+
*/
|
|
13
|
+
inputs: ZeroShotObjectDetectionInputData;
|
|
14
|
+
/**
|
|
15
|
+
* Additional inference parameters
|
|
16
|
+
*/
|
|
17
|
+
parameters?: {
|
|
18
|
+
[key: string]: unknown;
|
|
19
|
+
};
|
|
20
|
+
[property: string]: unknown;
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* The input image data, with candidate labels
|
|
24
|
+
*/
|
|
25
|
+
export interface ZeroShotObjectDetectionInputData {
|
|
26
|
+
/**
|
|
27
|
+
* The candidate labels for this image
|
|
28
|
+
*/
|
|
29
|
+
candidateLabels: string[];
|
|
30
|
+
/**
|
|
31
|
+
* The image data to generate bounding boxes from
|
|
32
|
+
*/
|
|
33
|
+
image: unknown;
|
|
34
|
+
[property: string]: unknown;
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* The predicted bounding box. Coordinates are relative to the top left corner of the input
|
|
38
|
+
* image.
|
|
39
|
+
*/
|
|
40
|
+
export interface BoundingBox {
|
|
41
|
+
xmax: number;
|
|
42
|
+
xmin: number;
|
|
43
|
+
ymax: number;
|
|
44
|
+
ymin: number;
|
|
45
|
+
[property: string]: unknown;
|
|
46
|
+
}
|
|
47
|
+
export type ZeroShotObjectDetectionOutput = ZeroShotObjectDetectionOutputElement[];
|
|
48
|
+
/**
|
|
49
|
+
* Outputs of inference for the Zero Shot Object Detection task
|
|
50
|
+
*/
|
|
51
|
+
export interface ZeroShotObjectDetectionOutputElement {
|
|
52
|
+
/**
|
|
53
|
+
* The predicted bounding box. Coordinates are relative to the top left corner of the input
|
|
54
|
+
* image.
|
|
55
|
+
*/
|
|
56
|
+
box: BoundingBox;
|
|
57
|
+
/**
|
|
58
|
+
* A candidate label
|
|
59
|
+
*/
|
|
60
|
+
label: string;
|
|
61
|
+
/**
|
|
62
|
+
* The associated score / probability
|
|
63
|
+
*/
|
|
64
|
+
score: number;
|
|
65
|
+
[property: string]: unknown;
|
|
66
|
+
}
|
|
67
|
+
//# sourceMappingURL=inference.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"inference.d.ts","sourceRoot":"","sources":["../../../src/tasks/zero-shot-object-detection/inference.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH;;GAEG;AACH,MAAM,WAAW,4BAA4B;IAC5C;;OAEG;IACH,MAAM,EAAE,gCAAgC,CAAC;IACzC;;OAEG;IACH,UAAU,CAAC,EAAE;QACZ,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;KACvB,CAAC;IACF,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC;CAC5B;AACD;;GAEG;AACH,MAAM,WAAW,gCAAgC;IAChD;;OAEG;IACH,eAAe,EAAE,MAAM,EAAE,CAAC;IAC1B;;OAEG;IACH,KAAK,EAAE,OAAO,CAAC;IACf,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC;CAC5B;AACD;;;GAGG;AACH,MAAM,WAAW,WAAW;IAC3B,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC;CAC5B;AACD,MAAM,MAAM,6BAA6B,GAAG,oCAAoC,EAAE,CAAC;AACnF;;GAEG;AACH,MAAM,WAAW,oCAAoC;IACpD;;;OAGG;IACH,GAAG,EAAE,WAAW,CAAC;IACjB;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IACd;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IACd,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC;CAC5B"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
export declare const SPECIAL_TOKENS_ATTRIBUTES: readonly ["bos_token", "eos_token", "unk_token", "sep_token", "pad_token", "cls_token", "mask_token"];
|
|
2
|
+
/**
|
|
3
|
+
* Public interface for a tokenizer's special tokens mapping
|
|
4
|
+
*/
|
|
5
|
+
export interface AddedToken {
|
|
6
|
+
__type: "AddedToken";
|
|
7
|
+
content?: string;
|
|
8
|
+
lstrip?: boolean;
|
|
9
|
+
normalized?: boolean;
|
|
10
|
+
rstrip?: boolean;
|
|
11
|
+
single_word?: boolean;
|
|
12
|
+
}
|
|
13
|
+
export type SpecialTokensMap = {
|
|
14
|
+
[key in (typeof SPECIAL_TOKENS_ATTRIBUTES)[number]]?: string | AddedToken | null;
|
|
15
|
+
};
|
|
16
|
+
/**
|
|
17
|
+
* Public interface for tokenizer config
|
|
18
|
+
*/
|
|
19
|
+
export interface TokenizerConfig extends SpecialTokensMap {
|
|
20
|
+
use_default_system_prompt?: boolean;
|
|
21
|
+
chat_template?: string | Array<{
|
|
22
|
+
name: string;
|
|
23
|
+
template: string;
|
|
24
|
+
}>;
|
|
25
|
+
}
|
|
26
|
+
//# sourceMappingURL=tokenizer-data.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tokenizer-data.d.cts","sourceRoot":"","sources":["../src/tokenizer-data.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,yBAAyB,uGAS5B,CAAC;AAEX;;GAEG;AACH,MAAM,WAAW,UAAU;IAC1B,MAAM,EAAE,YAAY,CAAC;IACrB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,WAAW,CAAC,EAAE,OAAO,CAAC;CACtB;AACD,MAAM,MAAM,gBAAgB,GAAG;KAC7B,GAAG,IAAI,CAAC,OAAO,yBAAyB,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,MAAM,GAAG,UAAU,GAAG,IAAI;CAChF,CAAC;AACF;;GAEG;AACH,MAAM,WAAW,eAAgB,SAAQ,gBAAgB;IACxD,yBAAyB,CAAC,EAAE,OAAO,CAAC;IACpC,aAAa,CAAC,EAAE,MAAM,GAAG,KAAK,CAAC;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,QAAQ,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;CACnE"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
export declare const SPECIAL_TOKENS_ATTRIBUTES: readonly ["bos_token", "eos_token", "unk_token", "sep_token", "pad_token", "cls_token", "mask_token"];
|
|
2
|
+
/**
|
|
3
|
+
* Public interface for a tokenizer's special tokens mapping
|
|
4
|
+
*/
|
|
5
|
+
export interface AddedToken {
|
|
6
|
+
__type: "AddedToken";
|
|
7
|
+
content?: string;
|
|
8
|
+
lstrip?: boolean;
|
|
9
|
+
normalized?: boolean;
|
|
10
|
+
rstrip?: boolean;
|
|
11
|
+
single_word?: boolean;
|
|
12
|
+
}
|
|
13
|
+
export type SpecialTokensMap = {
|
|
14
|
+
[key in (typeof SPECIAL_TOKENS_ATTRIBUTES)[number]]?: string | AddedToken | null;
|
|
15
|
+
};
|
|
16
|
+
/**
|
|
17
|
+
* Public interface for tokenizer config
|
|
18
|
+
*/
|
|
19
|
+
export interface TokenizerConfig extends SpecialTokensMap {
|
|
20
|
+
use_default_system_prompt?: boolean;
|
|
21
|
+
chat_template?: string | Array<{
|
|
22
|
+
name: string;
|
|
23
|
+
template: string;
|
|
24
|
+
}>;
|
|
25
|
+
}
|
|
26
|
+
//# sourceMappingURL=tokenizer-data.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tokenizer-data.d.ts","sourceRoot":"","sources":["../src/tokenizer-data.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,yBAAyB,uGAS5B,CAAC;AAEX;;GAEG;AACH,MAAM,WAAW,UAAU;IAC1B,MAAM,EAAE,YAAY,CAAC;IACrB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,WAAW,CAAC,EAAE,OAAO,CAAC;CACtB;AACD,MAAM,MAAM,gBAAgB,GAAG;KAC7B,GAAG,IAAI,CAAC,OAAO,yBAAyB,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,MAAM,GAAG,UAAU,GAAG,IAAI;CAChF,CAAC;AACF;;GAEG;AACH,MAAM,WAAW,eAAgB,SAAQ,gBAAgB;IACxD,yBAAyB,CAAC,EAAE,OAAO,CAAC;IACpC,aAAa,CAAC,EAAE,MAAM,GAAG,KAAK,CAAC;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,QAAQ,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;CACnE"}
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* See default-widget-inputs.ts for the default widget inputs, this files only contains the types
|
|
3
|
+
*/
|
|
4
|
+
import type { ChatCompletionInputMessage } from "./tasks";
|
|
5
|
+
type TableData = Record<string, (string | number)[]>;
|
|
6
|
+
export type WidgetExampleOutputLabels = Array<{
|
|
7
|
+
label: string;
|
|
8
|
+
score: number;
|
|
9
|
+
}>;
|
|
10
|
+
export interface WidgetExampleOutputAnswerScore {
|
|
11
|
+
answer: string;
|
|
12
|
+
score: number;
|
|
13
|
+
}
|
|
14
|
+
export interface WidgetExampleOutputText {
|
|
15
|
+
text: string;
|
|
16
|
+
}
|
|
17
|
+
export interface WidgetExampleOutputUrl {
|
|
18
|
+
url: string;
|
|
19
|
+
}
|
|
20
|
+
export type WidgetExampleOutput = WidgetExampleOutputLabels | WidgetExampleOutputAnswerScore | WidgetExampleOutputText | WidgetExampleOutputUrl;
|
|
21
|
+
export interface WidgetExampleBase<TOutput> {
|
|
22
|
+
example_title?: string;
|
|
23
|
+
group?: string;
|
|
24
|
+
/**
|
|
25
|
+
* Potential overrides to API parameters for this specific example
|
|
26
|
+
* (takes precedences over the model card metadata's inference.parameters)
|
|
27
|
+
*/
|
|
28
|
+
parameters?: {
|
|
29
|
+
aggregation_strategy?: string;
|
|
30
|
+
top_k?: number;
|
|
31
|
+
top_p?: number;
|
|
32
|
+
temperature?: number;
|
|
33
|
+
max_new_tokens?: number;
|
|
34
|
+
do_sample?: boolean;
|
|
35
|
+
negative_prompt?: string;
|
|
36
|
+
guidance_scale?: number;
|
|
37
|
+
num_inference_steps?: number;
|
|
38
|
+
};
|
|
39
|
+
/**
|
|
40
|
+
* Optional output
|
|
41
|
+
*/
|
|
42
|
+
output?: TOutput;
|
|
43
|
+
}
|
|
44
|
+
export interface WidgetExampleChatInput<TOutput = WidgetExampleOutput> extends WidgetExampleBase<TOutput> {
|
|
45
|
+
messages: ChatCompletionInputMessage[];
|
|
46
|
+
}
|
|
47
|
+
export interface WidgetExampleTextInput<TOutput = WidgetExampleOutput> extends WidgetExampleBase<TOutput> {
|
|
48
|
+
text: string;
|
|
49
|
+
}
|
|
50
|
+
export interface WidgetExampleTextAndContextInput<TOutput = WidgetExampleOutput> extends WidgetExampleTextInput<TOutput> {
|
|
51
|
+
context: string;
|
|
52
|
+
}
|
|
53
|
+
export interface WidgetExampleTextAndTableInput<TOutput = WidgetExampleOutput> extends WidgetExampleTextInput<TOutput> {
|
|
54
|
+
table: TableData;
|
|
55
|
+
}
|
|
56
|
+
export interface WidgetExampleAssetInput<TOutput = WidgetExampleOutput> extends WidgetExampleBase<TOutput> {
|
|
57
|
+
src: string;
|
|
58
|
+
}
|
|
59
|
+
export interface WidgetExampleAssetAndPromptInput<TOutput = WidgetExampleOutput> extends WidgetExampleAssetInput<TOutput> {
|
|
60
|
+
prompt: string;
|
|
61
|
+
}
|
|
62
|
+
export type WidgetExampleAssetAndTextInput<TOutput = WidgetExampleOutput> = WidgetExampleAssetInput<TOutput> & WidgetExampleTextInput<TOutput>;
|
|
63
|
+
export type WidgetExampleAssetAndZeroShotInput<TOutput = WidgetExampleOutput> = WidgetExampleAssetInput<TOutput> & WidgetExampleZeroShotTextInput<TOutput>;
|
|
64
|
+
export interface WidgetExampleStructuredDataInput<TOutput = WidgetExampleOutput> extends WidgetExampleBase<TOutput> {
|
|
65
|
+
structured_data: TableData;
|
|
66
|
+
}
|
|
67
|
+
export interface WidgetExampleTableDataInput<TOutput = WidgetExampleOutput> extends WidgetExampleBase<TOutput> {
|
|
68
|
+
table: TableData;
|
|
69
|
+
}
|
|
70
|
+
export interface WidgetExampleZeroShotTextInput<TOutput = WidgetExampleOutput> extends WidgetExampleTextInput<TOutput> {
|
|
71
|
+
text: string;
|
|
72
|
+
candidate_labels: string;
|
|
73
|
+
multi_class: boolean;
|
|
74
|
+
}
|
|
75
|
+
export interface WidgetExampleSentenceSimilarityInput<TOutput = WidgetExampleOutput> extends WidgetExampleBase<TOutput> {
|
|
76
|
+
source_sentence: string;
|
|
77
|
+
sentences: string[];
|
|
78
|
+
}
|
|
79
|
+
export type WidgetExample<TOutput = WidgetExampleOutput> = WidgetExampleChatInput<TOutput> | WidgetExampleTextInput<TOutput> | WidgetExampleTextAndContextInput<TOutput> | WidgetExampleTextAndTableInput<TOutput> | WidgetExampleAssetInput<TOutput> | WidgetExampleAssetAndPromptInput<TOutput> | WidgetExampleAssetAndTextInput<TOutput> | WidgetExampleAssetAndZeroShotInput<TOutput> | WidgetExampleStructuredDataInput<TOutput> | WidgetExampleTableDataInput<TOutput> | WidgetExampleZeroShotTextInput<TOutput> | WidgetExampleSentenceSimilarityInput<TOutput>;
|
|
80
|
+
type KeysOfUnion<T> = T extends unknown ? keyof T : never;
|
|
81
|
+
export type WidgetExampleAttribute = KeysOfUnion<WidgetExample>;
|
|
82
|
+
export {};
|
|
83
|
+
//# sourceMappingURL=widget-example.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"widget-example.d.c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;CACjB;AAED,MAAM,WAAW,8BAA8B,CAAC,OAAO,GAAG,mBAAmB,CAAE,SAAQ,sBAAsB,CAAC,OAAO,CAAC;IACrH,IAAI,EAAE,MAAM,CAAC;IACb,gBAAgB,EAAE,MAAM,CAAC;IACzB,WAAW,EAAE,OAAO,CAAC;CACrB;AAED,MAAM,WAAW,oCAAoC,CAAC,OAAO,GAAG,mBAAmB,CAClF,SAAQ,iBAAiB,CAAC,OAAO,CAAC;IAClC,eAAe,EAAE,MAAM,CAAC;IACxB,SAAS,EAAE,MAAM,EAAE,CAAC;CACpB;AAID,MAAM,MAAM,aAAa,CAAC,OAAO,GAAG,mBAAmB,IACpD,sBAAsB,CAAC,OAAO,CAAC,GAC/B,sBAAsB,CAAC,OAAO,CAAC,GAC/B,gCAAgC,CAAC,OAAO,CAAC,GACzC,8BAA8B,CAAC,OAAO,CAAC,GACvC,uBAAuB,CAAC,OAAO,CAAC,GAChC,gCAAgC,CAAC,OAAO,CAAC,GACzC,8BAA8B,CAAC,OAAO,CAAC,GACvC,kCAAkC,CAAC,OAAO,CAAC,GAC3C,gCAAgC,CAAC,OAAO,CAAC,GACzC,2BAA2B,CAAC,OAAO,CAAC,GACpC,8BAA8B,CAAC,OAAO,CAAC,GACvC,oCAAoC,CAAC,OAAO,CAAC,CAAC;AAEjD,KAAK,WAAW,CAAC,CAAC,IAAI,CAAC,SAAS,OAAO,GAAG,MAAM,CAAC,GAAG,KAAK,CAAC;AAE1D,MAAM,MAAM,sBAAsB,GAAG,WAAW,CAAC,aAAa,CAAC,CAAC"}
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* See default-widget-inputs.ts for the default widget inputs, this files only contains the types
|
|
3
|
+
*/
|
|
4
|
+
import type { ChatCompletionInputMessage } from "./tasks";
|
|
5
|
+
type TableData = Record<string, (string | number)[]>;
|
|
6
|
+
export type WidgetExampleOutputLabels = Array<{
|
|
7
|
+
label: string;
|
|
8
|
+
score: number;
|
|
9
|
+
}>;
|
|
10
|
+
export interface WidgetExampleOutputAnswerScore {
|
|
11
|
+
answer: string;
|
|
12
|
+
score: number;
|
|
13
|
+
}
|
|
14
|
+
export interface WidgetExampleOutputText {
|
|
15
|
+
text: string;
|
|
16
|
+
}
|
|
17
|
+
export interface WidgetExampleOutputUrl {
|
|
18
|
+
url: string;
|
|
19
|
+
}
|
|
20
|
+
export type WidgetExampleOutput = WidgetExampleOutputLabels | WidgetExampleOutputAnswerScore | WidgetExampleOutputText | WidgetExampleOutputUrl;
|
|
21
|
+
export interface WidgetExampleBase<TOutput> {
|
|
22
|
+
example_title?: string;
|
|
23
|
+
group?: string;
|
|
24
|
+
/**
|
|
25
|
+
* Potential overrides to API parameters for this specific example
|
|
26
|
+
* (takes precedences over the model card metadata's inference.parameters)
|
|
27
|
+
*/
|
|
28
|
+
parameters?: {
|
|
29
|
+
aggregation_strategy?: string;
|
|
30
|
+
top_k?: number;
|
|
31
|
+
top_p?: number;
|
|
32
|
+
temperature?: number;
|
|
33
|
+
max_new_tokens?: number;
|
|
34
|
+
do_sample?: boolean;
|
|
35
|
+
negative_prompt?: string;
|
|
36
|
+
guidance_scale?: number;
|
|
37
|
+
num_inference_steps?: number;
|
|
38
|
+
};
|
|
39
|
+
/**
|
|
40
|
+
* Optional output
|
|
41
|
+
*/
|
|
42
|
+
output?: TOutput;
|
|
43
|
+
}
|
|
44
|
+
export interface WidgetExampleChatInput<TOutput = WidgetExampleOutput> extends WidgetExampleBase<TOutput> {
|
|
45
|
+
messages: ChatCompletionInputMessage[];
|
|
46
|
+
}
|
|
47
|
+
export interface WidgetExampleTextInput<TOutput = WidgetExampleOutput> extends WidgetExampleBase<TOutput> {
|
|
48
|
+
text: string;
|
|
49
|
+
}
|
|
50
|
+
export interface WidgetExampleTextAndContextInput<TOutput = WidgetExampleOutput> extends WidgetExampleTextInput<TOutput> {
|
|
51
|
+
context: string;
|
|
52
|
+
}
|
|
53
|
+
export interface WidgetExampleTextAndTableInput<TOutput = WidgetExampleOutput> extends WidgetExampleTextInput<TOutput> {
|
|
54
|
+
table: TableData;
|
|
55
|
+
}
|
|
56
|
+
export interface WidgetExampleAssetInput<TOutput = WidgetExampleOutput> extends WidgetExampleBase<TOutput> {
|
|
57
|
+
src: string;
|
|
58
|
+
}
|
|
59
|
+
export interface WidgetExampleAssetAndPromptInput<TOutput = WidgetExampleOutput> extends WidgetExampleAssetInput<TOutput> {
|
|
60
|
+
prompt: string;
|
|
61
|
+
}
|
|
62
|
+
export type WidgetExampleAssetAndTextInput<TOutput = WidgetExampleOutput> = WidgetExampleAssetInput<TOutput> & WidgetExampleTextInput<TOutput>;
|
|
63
|
+
export type WidgetExampleAssetAndZeroShotInput<TOutput = WidgetExampleOutput> = WidgetExampleAssetInput<TOutput> & WidgetExampleZeroShotTextInput<TOutput>;
|
|
64
|
+
export interface WidgetExampleStructuredDataInput<TOutput = WidgetExampleOutput> extends WidgetExampleBase<TOutput> {
|
|
65
|
+
structured_data: TableData;
|
|
66
|
+
}
|
|
67
|
+
export interface WidgetExampleTableDataInput<TOutput = WidgetExampleOutput> extends WidgetExampleBase<TOutput> {
|
|
68
|
+
table: TableData;
|
|
69
|
+
}
|
|
70
|
+
export interface WidgetExampleZeroShotTextInput<TOutput = WidgetExampleOutput> extends WidgetExampleTextInput<TOutput> {
|
|
71
|
+
text: string;
|
|
72
|
+
candidate_labels: string;
|
|
73
|
+
multi_class: boolean;
|
|
74
|
+
}
|
|
75
|
+
export interface WidgetExampleSentenceSimilarityInput<TOutput = WidgetExampleOutput> extends WidgetExampleBase<TOutput> {
|
|
76
|
+
source_sentence: string;
|
|
77
|
+
sentences: string[];
|
|
78
|
+
}
|
|
79
|
+
export type WidgetExample<TOutput = WidgetExampleOutput> = WidgetExampleChatInput<TOutput> | WidgetExampleTextInput<TOutput> | WidgetExampleTextAndContextInput<TOutput> | WidgetExampleTextAndTableInput<TOutput> | WidgetExampleAssetInput<TOutput> | WidgetExampleAssetAndPromptInput<TOutput> | WidgetExampleAssetAndTextInput<TOutput> | WidgetExampleAssetAndZeroShotInput<TOutput> | WidgetExampleStructuredDataInput<TOutput> | WidgetExampleTableDataInput<TOutput> | WidgetExampleZeroShotTextInput<TOutput> | WidgetExampleSentenceSimilarityInput<TOutput>;
|
|
80
|
+
type KeysOfUnion<T> = T extends unknown ? keyof T : never;
|
|
81
|
+
export type WidgetExampleAttribute = KeysOfUnion<WidgetExample>;
|
|
82
|
+
export {};
|
|
83
|
+
//# sourceMappingURL=widget-example.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"widget-example.d.ts","sourceRoot":"","sources":["../src/widget-example.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,SAAS,CAAC;AAE1D,KAAK,SAAS,GAAG,MAAM,CAAC,MAAM,EAAE,CAAC,MAAM,GAAG,MAAM,CAAC,EAAE,CAAC,CAAC;AAGrD,MAAM,MAAM,yBAAyB,GAAG,KAAK,CAAC;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,CAAC,CAAC;AAChF,MAAM,WAAW,8BAA8B;IAC9C,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,MAAM,CAAC;CACd;AACD,MAAM,WAAW,uBAAuB;IACvC,IAAI,EAAE,MAAM,CAAC;CACb;AACD,MAAM,WAAW,sBAAsB;IACtC,GAAG,EAAE,MAAM,CAAC;CACZ;AAED,MAAM,MAAM,mBAAmB,GAC5B,yBAAyB,GACzB,8BAA8B,GAC9B,uBAAuB,GACvB,sBAAsB,CAAC;AAG1B,MAAM,WAAW,iBAAiB,CAAC,OAAO;IACzC,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;;OAGG;IACH,UAAU,CAAC,EAAE;QAEZ,oBAAoB,CAAC,EAAE,MAAM,CAAC;QAE9B,KAAK,CAAC,EAAE,MAAM,CA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,GAAG,MAAM,CAAC,GAAG,KAAK,CAAC;AAE1D,MAAM,MAAM,sBAAsB,GAAG,WAAW,CAAC,aAAa,CAAC,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@huggingface/tasks",
|
|
3
3
|
"packageManager": "pnpm@8.10.5",
|
|
4
|
-
"version": "0.13.0-
|
|
4
|
+
"version": "0.13.0-test3",
|
|
5
5
|
"description": "List of ML tasks for huggingface.co/tasks",
|
|
6
6
|
"repository": "https://github.com/huggingface/huggingface.js.git",
|
|
7
7
|
"publishConfig": {
|
|
@@ -9,8 +9,10 @@
|
|
|
9
9
|
},
|
|
10
10
|
"main": "./dist/index.cjs",
|
|
11
11
|
"module": "./dist/index.js",
|
|
12
|
+
"types": "./dist/index.d.ts",
|
|
12
13
|
"exports": {
|
|
13
14
|
".": {
|
|
15
|
+
"types": "./dist/src/index.d.ts",
|
|
14
16
|
"require": "./dist/index.cjs",
|
|
15
17
|
"import": "./dist/index.js"
|
|
16
18
|
}
|
|
@@ -39,12 +41,13 @@
|
|
|
39
41
|
"lint:check": "eslint --ext .cjs,.ts .",
|
|
40
42
|
"format": "prettier --write .",
|
|
41
43
|
"format:check": "prettier --check .",
|
|
42
|
-
"build": "tsup src/index.ts --format cjs,esm --
|
|
44
|
+
"build": "tsup src/index.ts --format cjs,esm --clean && tsc --emitDeclarationOnly --declaration && pnpm run generate-cts",
|
|
43
45
|
"watch:export": "tsup src/index.ts --format cjs,esm --watch",
|
|
44
46
|
"watch:types": "tsc --emitDeclarationOnly --declaration --watch",
|
|
45
47
|
"watch": "npm-run-all --parallel watch:export watch:types",
|
|
46
48
|
"check": "tsc",
|
|
47
49
|
"test": "vitest run",
|
|
50
|
+
"generate-cts": "tsx scripts/generate-cts.ts",
|
|
48
51
|
"inference-codegen": "tsx scripts/inference-codegen.ts && prettier --write src/tasks/*/inference.ts",
|
|
49
52
|
"inference-tgi-import": "tsx scripts/inference-tgi-import.ts && prettier --write src/tasks/text-generation/spec/*.json && prettier --write src/tasks/chat-completion/spec/*.json",
|
|
50
53
|
"inference-tei-import": "tsx scripts/inference-tei-import.ts && prettier --write src/tasks/feature-extraction/spec/*.json"
|