@huggingface/tasks 0.13.1 → 0.13.2

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.
Files changed (688) hide show
  1. package/dist/commonjs/dataset-libraries.js +65 -0
  2. package/dist/{src → commonjs}/default-widget-inputs.d.ts +2 -2
  3. package/dist/commonjs/default-widget-inputs.d.ts.map +1 -0
  4. package/dist/commonjs/default-widget-inputs.js +698 -0
  5. package/dist/commonjs/gguf.js +43 -0
  6. package/dist/commonjs/hardware.js +461 -0
  7. package/dist/{src → commonjs}/index.d.ts +19 -19
  8. package/dist/commonjs/index.d.ts.map +1 -0
  9. package/dist/commonjs/index.js +57 -0
  10. package/dist/{src → commonjs}/library-to-tasks.d.ts +2 -2
  11. package/dist/commonjs/library-to-tasks.d.ts.map +1 -0
  12. package/dist/commonjs/library-to-tasks.js +76 -0
  13. package/dist/{src → commonjs}/local-apps.d.ts +2 -2
  14. package/dist/commonjs/local-apps.d.ts.map +1 -0
  15. package/dist/commonjs/local-apps.js +334 -0
  16. package/dist/{src → commonjs}/model-data.d.ts +3 -3
  17. package/dist/commonjs/model-data.d.ts.map +1 -0
  18. package/dist/commonjs/model-data.js +2 -0
  19. package/dist/commonjs/model-libraries-downloads.js +18 -0
  20. package/dist/{src → commonjs}/model-libraries-snippets.d.ts +1 -1
  21. package/dist/commonjs/model-libraries-snippets.d.ts.map +1 -0
  22. package/dist/commonjs/model-libraries-snippets.js +1093 -0
  23. package/dist/{src → commonjs}/model-libraries.d.ts +3 -3
  24. package/dist/{src → commonjs}/model-libraries.d.ts.map +1 -1
  25. package/dist/commonjs/model-libraries.js +793 -0
  26. package/dist/commonjs/package.json +3 -0
  27. package/dist/{src → commonjs}/pipelines.d.ts +1 -1
  28. package/dist/{src → commonjs}/pipelines.d.ts.map +1 -1
  29. package/dist/commonjs/pipelines.js +645 -0
  30. package/dist/{src → commonjs}/snippets/common.d.ts +1 -1
  31. package/dist/commonjs/snippets/common.d.ts.map +1 -0
  32. package/dist/commonjs/snippets/common.js +23 -0
  33. package/dist/commonjs/snippets/curl.js +100 -0
  34. package/dist/commonjs/snippets/curl.spec.js +89 -0
  35. package/dist/commonjs/snippets/index.d.ts +7 -0
  36. package/dist/commonjs/snippets/index.d.ts.map +1 -0
  37. package/dist/commonjs/snippets/index.js +38 -0
  38. package/dist/commonjs/snippets/inputs.d.ts +4 -0
  39. package/dist/commonjs/snippets/inputs.d.ts.map +1 -0
  40. package/dist/commonjs/snippets/inputs.js +127 -0
  41. package/dist/commonjs/snippets/js.js +278 -0
  42. package/dist/commonjs/snippets/js.spec.js +141 -0
  43. package/dist/{src → commonjs}/snippets/python.d.ts +1 -1
  44. package/dist/{src → commonjs}/snippets/python.d.ts.map +1 -1
  45. package/dist/commonjs/snippets/python.js +293 -0
  46. package/dist/commonjs/snippets/python.spec.js +135 -0
  47. package/dist/{src → commonjs}/snippets/types.d.ts +1 -1
  48. package/dist/commonjs/snippets/types.d.ts.map +1 -0
  49. package/dist/commonjs/snippets/types.js +2 -0
  50. package/dist/commonjs/tasks/audio-classification/data.d.ts +4 -0
  51. package/dist/{src → commonjs}/tasks/audio-classification/data.d.ts.map +1 -1
  52. package/dist/commonjs/tasks/audio-classification/data.js +79 -0
  53. package/dist/commonjs/tasks/audio-classification/inference.js +2 -0
  54. package/dist/commonjs/tasks/audio-to-audio/data.d.ts +4 -0
  55. package/dist/{src → commonjs}/tasks/audio-to-audio/data.d.ts.map +1 -1
  56. package/dist/commonjs/tasks/audio-to-audio/data.js +66 -0
  57. package/dist/commonjs/tasks/automatic-speech-recognition/data.d.ts +4 -0
  58. package/dist/{src → commonjs}/tasks/automatic-speech-recognition/data.d.ts.map +1 -1
  59. package/dist/commonjs/tasks/automatic-speech-recognition/data.js +80 -0
  60. package/dist/commonjs/tasks/automatic-speech-recognition/inference.js +7 -0
  61. package/dist/commonjs/tasks/chat-completion/inference.js +7 -0
  62. package/dist/commonjs/tasks/depth-estimation/data.d.ts +4 -0
  63. package/dist/{src → commonjs}/tasks/depth-estimation/data.d.ts.map +1 -1
  64. package/dist/commonjs/tasks/depth-estimation/data.js +69 -0
  65. package/dist/commonjs/tasks/depth-estimation/inference.js +7 -0
  66. package/dist/commonjs/tasks/document-question-answering/data.d.ts +4 -0
  67. package/dist/{src → commonjs}/tasks/document-question-answering/data.d.ts.map +1 -1
  68. package/dist/commonjs/tasks/document-question-answering/data.js +80 -0
  69. package/dist/commonjs/tasks/document-question-answering/inference.js +2 -0
  70. package/dist/commonjs/tasks/feature-extraction/data.d.ts +4 -0
  71. package/dist/{src → commonjs}/tasks/feature-extraction/data.d.ts.map +1 -1
  72. package/dist/commonjs/tasks/feature-extraction/data.js +55 -0
  73. package/dist/commonjs/tasks/feature-extraction/inference.js +7 -0
  74. package/dist/commonjs/tasks/fill-mask/data.d.ts +4 -0
  75. package/dist/{src → commonjs}/tasks/fill-mask/data.d.ts.map +1 -1
  76. package/dist/commonjs/tasks/fill-mask/data.js +75 -0
  77. package/dist/commonjs/tasks/fill-mask/inference.js +2 -0
  78. package/dist/commonjs/tasks/image-classification/data.d.ts +4 -0
  79. package/dist/{src → commonjs}/tasks/image-classification/data.d.ts.map +1 -1
  80. package/dist/commonjs/tasks/image-classification/data.js +86 -0
  81. package/dist/commonjs/tasks/image-classification/inference.js +2 -0
  82. package/dist/commonjs/tasks/image-feature-extraction/data.d.ts +4 -0
  83. package/dist/{src → commonjs}/tasks/image-feature-extraction/data.d.ts.map +1 -1
  84. package/dist/commonjs/tasks/image-feature-extraction/data.js +57 -0
  85. package/dist/commonjs/tasks/image-segmentation/data.d.ts +4 -0
  86. package/dist/{src → commonjs}/tasks/image-segmentation/data.d.ts.map +1 -1
  87. package/dist/commonjs/tasks/image-segmentation/data.js +95 -0
  88. package/dist/commonjs/tasks/image-segmentation/inference.js +2 -0
  89. package/dist/commonjs/tasks/image-text-to-text/data.d.ts +4 -0
  90. package/dist/{src → commonjs}/tasks/image-text-to-text/data.d.ts.map +1 -1
  91. package/dist/commonjs/tasks/image-text-to-text/data.js +99 -0
  92. package/dist/commonjs/tasks/image-to-3d/data.d.ts +4 -0
  93. package/dist/{src → commonjs}/tasks/image-to-3d/data.d.ts.map +1 -1
  94. package/dist/commonjs/tasks/image-to-3d/data.js +74 -0
  95. package/dist/commonjs/tasks/image-to-image/data.d.ts +4 -0
  96. package/dist/{src → commonjs}/tasks/image-to-image/data.d.ts.map +1 -1
  97. package/dist/commonjs/tasks/image-to-image/data.js +95 -0
  98. package/dist/commonjs/tasks/image-to-image/inference.js +7 -0
  99. package/dist/commonjs/tasks/image-to-text/data.d.ts +4 -0
  100. package/dist/{src → commonjs}/tasks/image-to-text/data.d.ts.map +1 -1
  101. package/dist/commonjs/tasks/image-to-text/data.js +80 -0
  102. package/dist/commonjs/tasks/image-to-text/inference.js +7 -0
  103. package/dist/{src → commonjs}/tasks/index.d.ts +29 -29
  104. package/dist/commonjs/tasks/index.d.ts.map +1 -0
  105. package/dist/commonjs/tasks/index.js +183 -0
  106. package/dist/commonjs/tasks/keypoint-detection/data.d.ts +4 -0
  107. package/dist/{src → commonjs}/tasks/keypoint-detection/data.d.ts.map +1 -1
  108. package/dist/commonjs/tasks/keypoint-detection/data.js +49 -0
  109. package/dist/commonjs/tasks/mask-generation/data.d.ts +4 -0
  110. package/dist/{src → commonjs}/tasks/mask-generation/data.d.ts.map +1 -1
  111. package/dist/commonjs/tasks/mask-generation/data.js +52 -0
  112. package/dist/commonjs/tasks/object-detection/data.d.ts +4 -0
  113. package/dist/{src → commonjs}/tasks/object-detection/data.d.ts.map +1 -1
  114. package/dist/commonjs/tasks/object-detection/data.js +82 -0
  115. package/dist/commonjs/tasks/object-detection/inference.js +2 -0
  116. package/dist/commonjs/tasks/placeholder/data.d.ts +4 -0
  117. package/dist/{src → commonjs}/tasks/placeholder/data.d.ts.map +1 -1
  118. package/dist/commonjs/tasks/placeholder/data.js +20 -0
  119. package/dist/commonjs/tasks/question-answering/data.d.ts +4 -0
  120. package/dist/{src → commonjs}/tasks/question-answering/data.d.ts.map +1 -1
  121. package/dist/commonjs/tasks/question-answering/data.js +71 -0
  122. package/dist/commonjs/tasks/question-answering/inference.js +2 -0
  123. package/dist/commonjs/tasks/reinforcement-learning/data.d.ts +4 -0
  124. package/dist/{src → commonjs}/tasks/reinforcement-learning/data.d.ts.map +1 -1
  125. package/dist/commonjs/tasks/reinforcement-learning/data.js +69 -0
  126. package/dist/commonjs/tasks/sentence-similarity/data.d.ts +4 -0
  127. package/dist/{src → commonjs}/tasks/sentence-similarity/data.d.ts.map +1 -1
  128. package/dist/commonjs/tasks/sentence-similarity/data.js +95 -0
  129. package/dist/commonjs/tasks/sentence-similarity/inference.js +7 -0
  130. package/dist/commonjs/tasks/summarization/data.d.ts +4 -0
  131. package/dist/{src → commonjs}/tasks/summarization/data.d.ts.map +1 -1
  132. package/dist/commonjs/tasks/summarization/data.js +69 -0
  133. package/dist/commonjs/tasks/summarization/inference.js +7 -0
  134. package/dist/commonjs/tasks/table-question-answering/data.d.ts +4 -0
  135. package/dist/{src → commonjs}/tasks/table-question-answering/data.d.ts.map +1 -1
  136. package/dist/commonjs/tasks/table-question-answering/data.js +54 -0
  137. package/dist/commonjs/tasks/table-question-answering/inference.js +2 -0
  138. package/dist/commonjs/tasks/tabular-classification/data.d.ts +4 -0
  139. package/dist/{src → commonjs}/tasks/tabular-classification/data.d.ts.map +1 -1
  140. package/dist/commonjs/tasks/tabular-classification/data.js +67 -0
  141. package/dist/commonjs/tasks/tabular-regression/data.d.ts +4 -0
  142. package/dist/{src → commonjs}/tasks/tabular-regression/data.d.ts.map +1 -1
  143. package/dist/commonjs/tasks/tabular-regression/data.js +55 -0
  144. package/dist/commonjs/tasks/text-classification/data.d.ts +4 -0
  145. package/dist/{src → commonjs}/tasks/text-classification/data.d.ts.map +1 -1
  146. package/dist/commonjs/tasks/text-classification/data.js +100 -0
  147. package/dist/commonjs/tasks/text-classification/inference.js +2 -0
  148. package/dist/commonjs/tasks/text-generation/data.d.ts +4 -0
  149. package/dist/{src → commonjs}/tasks/text-generation/data.d.ts.map +1 -1
  150. package/dist/commonjs/tasks/text-generation/data.js +108 -0
  151. package/dist/commonjs/tasks/text-generation/inference.js +7 -0
  152. package/dist/commonjs/tasks/text-to-3d/data.d.ts +4 -0
  153. package/dist/{src → commonjs}/tasks/text-to-3d/data.d.ts.map +1 -1
  154. package/dist/commonjs/tasks/text-to-3d/data.js +55 -0
  155. package/dist/commonjs/tasks/text-to-audio/inference.js +7 -0
  156. package/dist/commonjs/tasks/text-to-image/data.d.ts +4 -0
  157. package/dist/{src → commonjs}/tasks/text-to-image/data.d.ts.map +1 -1
  158. package/dist/commonjs/tasks/text-to-image/data.js +95 -0
  159. package/dist/commonjs/tasks/text-to-image/inference.js +7 -0
  160. package/dist/commonjs/tasks/text-to-speech/data.d.ts +4 -0
  161. package/dist/{src → commonjs}/tasks/text-to-speech/data.d.ts.map +1 -1
  162. package/dist/commonjs/tasks/text-to-speech/data.js +76 -0
  163. package/dist/commonjs/tasks/text-to-speech/inference.js +7 -0
  164. package/dist/commonjs/tasks/text-to-video/data.d.ts +4 -0
  165. package/dist/{src → commonjs}/tasks/text-to-video/data.d.ts.map +1 -1
  166. package/dist/commonjs/tasks/text-to-video/data.js +95 -0
  167. package/dist/commonjs/tasks/text2text-generation/inference.js +7 -0
  168. package/dist/commonjs/tasks/token-classification/data.d.ts +4 -0
  169. package/dist/{src → commonjs}/tasks/token-classification/data.d.ts.map +1 -1
  170. package/dist/commonjs/tasks/token-classification/data.js +87 -0
  171. package/dist/commonjs/tasks/token-classification/inference.js +2 -0
  172. package/dist/commonjs/tasks/translation/data.d.ts +4 -0
  173. package/dist/{src → commonjs}/tasks/translation/data.d.ts.map +1 -1
  174. package/dist/commonjs/tasks/translation/data.js +65 -0
  175. package/dist/commonjs/tasks/translation/inference.js +7 -0
  176. package/dist/commonjs/tasks/unconditional-image-generation/data.d.ts +4 -0
  177. package/dist/{src → commonjs}/tasks/unconditional-image-generation/data.d.ts.map +1 -1
  178. package/dist/commonjs/tasks/unconditional-image-generation/data.js +65 -0
  179. package/dist/commonjs/tasks/video-classification/data.d.ts +4 -0
  180. package/dist/{src → commonjs}/tasks/video-classification/data.d.ts.map +1 -1
  181. package/dist/commonjs/tasks/video-classification/data.js +82 -0
  182. package/dist/commonjs/tasks/video-classification/inference.js +2 -0
  183. package/dist/commonjs/tasks/video-text-to-text/data.d.ts +4 -0
  184. package/dist/{src → commonjs}/tasks/video-text-to-text/data.d.ts.map +1 -1
  185. package/dist/commonjs/tasks/video-text-to-text/data.js +63 -0
  186. package/dist/commonjs/tasks/visual-question-answering/data.d.ts +4 -0
  187. package/dist/{src → commonjs}/tasks/visual-question-answering/data.d.ts.map +1 -1
  188. package/dist/commonjs/tasks/visual-question-answering/data.js +93 -0
  189. package/dist/commonjs/tasks/visual-question-answering/inference.js +2 -0
  190. package/dist/commonjs/tasks/zero-shot-classification/data.d.ts +4 -0
  191. package/dist/{src → commonjs}/tasks/zero-shot-classification/data.d.ts.map +1 -1
  192. package/dist/commonjs/tasks/zero-shot-classification/data.js +66 -0
  193. package/dist/commonjs/tasks/zero-shot-classification/inference.js +2 -0
  194. package/dist/commonjs/tasks/zero-shot-image-classification/data.d.ts +4 -0
  195. package/dist/{src → commonjs}/tasks/zero-shot-image-classification/data.d.ts.map +1 -1
  196. package/dist/commonjs/tasks/zero-shot-image-classification/data.js +81 -0
  197. package/dist/commonjs/tasks/zero-shot-image-classification/inference.js +2 -0
  198. package/dist/commonjs/tasks/zero-shot-object-detection/data.d.ts +4 -0
  199. package/dist/{src → commonjs}/tasks/zero-shot-object-detection/data.d.ts.map +1 -1
  200. package/dist/commonjs/tasks/zero-shot-object-detection/data.js +62 -0
  201. package/dist/commonjs/tasks/zero-shot-object-detection/inference.js +2 -0
  202. package/dist/commonjs/tokenizer-data.js +13 -0
  203. package/dist/{src → commonjs}/widget-example.d.ts +1 -1
  204. package/dist/commonjs/widget-example.d.ts.map +1 -0
  205. package/dist/commonjs/widget-example.js +5 -0
  206. package/dist/esm/dataset-libraries.d.ts +87 -0
  207. package/dist/esm/dataset-libraries.d.ts.map +1 -0
  208. package/dist/esm/dataset-libraries.js +62 -0
  209. package/dist/esm/default-widget-inputs.d.ts +6 -0
  210. package/dist/esm/default-widget-inputs.d.ts.map +1 -0
  211. package/dist/esm/default-widget-inputs.js +695 -0
  212. package/dist/esm/gguf.d.ts +35 -0
  213. package/dist/esm/gguf.d.ts.map +1 -0
  214. package/dist/esm/gguf.js +39 -0
  215. package/dist/esm/hardware.d.ts +478 -0
  216. package/dist/esm/hardware.d.ts.map +1 -0
  217. package/dist/esm/hardware.js +458 -0
  218. package/dist/esm/index.d.ts +21 -0
  219. package/dist/esm/index.d.ts.map +1 -0
  220. package/dist/esm/index.js +12 -0
  221. package/dist/esm/library-to-tasks.d.ts +11 -0
  222. package/dist/esm/library-to-tasks.d.ts.map +1 -0
  223. package/dist/esm/library-to-tasks.js +73 -0
  224. package/dist/esm/local-apps.d.ts +195 -0
  225. package/dist/esm/local-apps.d.ts.map +1 -0
  226. package/dist/esm/local-apps.js +331 -0
  227. package/dist/esm/model-data.d.ts +146 -0
  228. package/dist/esm/model-data.d.ts.map +1 -0
  229. package/dist/esm/model-data.js +1 -0
  230. package/dist/esm/model-libraries-downloads.d.ts +18 -0
  231. package/dist/esm/model-libraries-downloads.d.ts.map +1 -0
  232. package/dist/esm/model-libraries-downloads.js +17 -0
  233. package/dist/esm/model-libraries-snippets.d.ts +72 -0
  234. package/dist/esm/model-libraries-snippets.d.ts.map +1 -0
  235. package/dist/esm/model-libraries-snippets.js +1019 -0
  236. package/dist/esm/model-libraries.d.ts +804 -0
  237. package/dist/esm/model-libraries.d.ts.map +1 -0
  238. package/dist/esm/model-libraries.js +767 -0
  239. package/dist/esm/package.json +3 -0
  240. package/dist/esm/pipelines.d.ts +425 -0
  241. package/dist/esm/pipelines.d.ts.map +1 -0
  242. package/dist/esm/pipelines.js +642 -0
  243. package/dist/esm/snippets/common.d.ts +14 -0
  244. package/dist/esm/snippets/common.d.ts.map +1 -0
  245. package/dist/esm/snippets/common.js +19 -0
  246. package/dist/esm/snippets/curl.d.ts +17 -0
  247. package/dist/esm/snippets/curl.d.ts.map +1 -0
  248. package/dist/esm/snippets/curl.js +91 -0
  249. package/dist/esm/snippets/curl.spec.d.ts +2 -0
  250. package/dist/esm/snippets/curl.spec.d.ts.map +1 -0
  251. package/dist/esm/snippets/curl.spec.js +87 -0
  252. package/dist/esm/snippets/index.d.ts +7 -0
  253. package/dist/esm/snippets/index.d.ts.map +1 -0
  254. package/dist/esm/snippets/index.js +6 -0
  255. package/dist/esm/snippets/inputs.d.ts +4 -0
  256. package/dist/esm/snippets/inputs.d.ts.map +1 -0
  257. package/dist/esm/snippets/inputs.js +124 -0
  258. package/dist/esm/snippets/js.d.ts +19 -0
  259. package/dist/esm/snippets/js.d.ts.map +1 -0
  260. package/dist/esm/snippets/js.js +267 -0
  261. package/dist/esm/snippets/js.spec.d.ts +2 -0
  262. package/dist/esm/snippets/js.spec.d.ts.map +1 -0
  263. package/dist/esm/snippets/js.spec.js +139 -0
  264. package/dist/esm/snippets/python.d.ts +22 -0
  265. package/dist/esm/snippets/python.d.ts.map +1 -0
  266. package/dist/esm/snippets/python.js +279 -0
  267. package/dist/esm/snippets/python.spec.d.ts +2 -0
  268. package/dist/esm/snippets/python.spec.d.ts.map +1 -0
  269. package/dist/esm/snippets/python.spec.js +133 -0
  270. package/dist/esm/snippets/types.d.ts +12 -0
  271. package/dist/esm/snippets/types.d.ts.map +1 -0
  272. package/dist/esm/snippets/types.js +1 -0
  273. package/dist/esm/tasks/audio-classification/data.d.ts +4 -0
  274. package/dist/esm/tasks/audio-classification/data.d.ts.map +1 -0
  275. package/dist/esm/tasks/audio-classification/data.js +77 -0
  276. package/dist/esm/tasks/audio-classification/inference.d.ts +53 -0
  277. package/dist/esm/tasks/audio-classification/inference.d.ts.map +1 -0
  278. package/dist/esm/tasks/audio-classification/inference.js +1 -0
  279. package/dist/esm/tasks/audio-to-audio/data.d.ts +4 -0
  280. package/dist/esm/tasks/audio-to-audio/data.d.ts.map +1 -0
  281. package/dist/esm/tasks/audio-to-audio/data.js +64 -0
  282. package/dist/esm/tasks/automatic-speech-recognition/data.d.ts +4 -0
  283. package/dist/esm/tasks/automatic-speech-recognition/data.d.ts.map +1 -0
  284. package/dist/esm/tasks/automatic-speech-recognition/data.js +78 -0
  285. package/dist/esm/tasks/automatic-speech-recognition/inference.d.ts +155 -0
  286. package/dist/esm/tasks/automatic-speech-recognition/inference.d.ts.map +1 -0
  287. package/dist/esm/tasks/automatic-speech-recognition/inference.js +6 -0
  288. package/dist/esm/tasks/chat-completion/inference.d.ts +291 -0
  289. package/dist/esm/tasks/chat-completion/inference.d.ts.map +1 -0
  290. package/dist/esm/tasks/chat-completion/inference.js +6 -0
  291. package/dist/esm/tasks/depth-estimation/data.d.ts +4 -0
  292. package/dist/esm/tasks/depth-estimation/data.d.ts.map +1 -0
  293. package/dist/esm/tasks/depth-estimation/data.js +67 -0
  294. package/dist/esm/tasks/depth-estimation/inference.d.ts +36 -0
  295. package/dist/esm/tasks/depth-estimation/inference.d.ts.map +1 -0
  296. package/dist/esm/tasks/depth-estimation/inference.js +6 -0
  297. package/dist/esm/tasks/document-question-answering/data.d.ts +4 -0
  298. package/dist/esm/tasks/document-question-answering/data.d.ts.map +1 -0
  299. package/dist/esm/tasks/document-question-answering/data.js +78 -0
  300. package/dist/esm/tasks/document-question-answering/inference.d.ts +111 -0
  301. package/dist/esm/tasks/document-question-answering/inference.d.ts.map +1 -0
  302. package/dist/esm/tasks/document-question-answering/inference.js +1 -0
  303. package/dist/esm/tasks/feature-extraction/data.d.ts +4 -0
  304. package/dist/esm/tasks/feature-extraction/data.d.ts.map +1 -0
  305. package/dist/esm/tasks/feature-extraction/data.js +53 -0
  306. package/dist/esm/tasks/feature-extraction/inference.d.ts +38 -0
  307. package/dist/esm/tasks/feature-extraction/inference.d.ts.map +1 -0
  308. package/dist/esm/tasks/feature-extraction/inference.js +6 -0
  309. package/dist/esm/tasks/fill-mask/data.d.ts +4 -0
  310. package/dist/esm/tasks/fill-mask/data.d.ts.map +1 -0
  311. package/dist/esm/tasks/fill-mask/data.js +73 -0
  312. package/dist/esm/tasks/fill-mask/inference.d.ts +63 -0
  313. package/dist/esm/tasks/fill-mask/inference.d.ts.map +1 -0
  314. package/dist/esm/tasks/fill-mask/inference.js +1 -0
  315. package/dist/esm/tasks/image-classification/data.d.ts +4 -0
  316. package/dist/esm/tasks/image-classification/data.d.ts.map +1 -0
  317. package/dist/esm/tasks/image-classification/data.js +84 -0
  318. package/dist/esm/tasks/image-classification/inference.d.ts +53 -0
  319. package/dist/esm/tasks/image-classification/inference.d.ts.map +1 -0
  320. package/dist/esm/tasks/image-classification/inference.js +1 -0
  321. package/dist/esm/tasks/image-feature-extraction/data.d.ts +4 -0
  322. package/dist/esm/tasks/image-feature-extraction/data.d.ts.map +1 -0
  323. package/dist/esm/tasks/image-feature-extraction/data.js +55 -0
  324. package/dist/esm/tasks/image-segmentation/data.d.ts +4 -0
  325. package/dist/esm/tasks/image-segmentation/data.d.ts.map +1 -0
  326. package/dist/esm/tasks/image-segmentation/data.js +93 -0
  327. package/dist/esm/tasks/image-segmentation/inference.d.ts +70 -0
  328. package/dist/esm/tasks/image-segmentation/inference.d.ts.map +1 -0
  329. package/dist/esm/tasks/image-segmentation/inference.js +1 -0
  330. package/dist/esm/tasks/image-text-to-text/data.d.ts +4 -0
  331. package/dist/esm/tasks/image-text-to-text/data.d.ts.map +1 -0
  332. package/dist/esm/tasks/image-text-to-text/data.js +97 -0
  333. package/dist/esm/tasks/image-to-3d/data.d.ts +4 -0
  334. package/dist/esm/tasks/image-to-3d/data.d.ts.map +1 -0
  335. package/dist/esm/tasks/image-to-3d/data.js +72 -0
  336. package/dist/esm/tasks/image-to-image/data.d.ts +4 -0
  337. package/dist/esm/tasks/image-to-image/data.d.ts.map +1 -0
  338. package/dist/esm/tasks/image-to-image/data.js +93 -0
  339. package/dist/esm/tasks/image-to-image/inference.d.ts +65 -0
  340. package/dist/esm/tasks/image-to-image/inference.d.ts.map +1 -0
  341. package/dist/esm/tasks/image-to-image/inference.js +6 -0
  342. package/dist/esm/tasks/image-to-text/data.d.ts +4 -0
  343. package/dist/esm/tasks/image-to-text/data.d.ts.map +1 -0
  344. package/dist/esm/tasks/image-to-text/data.js +78 -0
  345. package/dist/esm/tasks/image-to-text/inference.d.ts +139 -0
  346. package/dist/esm/tasks/image-to-text/inference.d.ts.map +1 -0
  347. package/dist/esm/tasks/image-to-text/inference.js +6 -0
  348. package/dist/esm/tasks/index.d.ts +87 -0
  349. package/dist/esm/tasks/index.d.ts.map +1 -0
  350. package/dist/esm/tasks/index.js +177 -0
  351. package/dist/esm/tasks/keypoint-detection/data.d.ts +4 -0
  352. package/dist/esm/tasks/keypoint-detection/data.d.ts.map +1 -0
  353. package/dist/esm/tasks/keypoint-detection/data.js +47 -0
  354. package/dist/esm/tasks/mask-generation/data.d.ts +4 -0
  355. package/dist/esm/tasks/mask-generation/data.d.ts.map +1 -0
  356. package/dist/esm/tasks/mask-generation/data.js +50 -0
  357. package/dist/esm/tasks/object-detection/data.d.ts +4 -0
  358. package/dist/esm/tasks/object-detection/data.d.ts.map +1 -0
  359. package/dist/esm/tasks/object-detection/data.js +80 -0
  360. package/dist/esm/tasks/object-detection/inference.d.ts +76 -0
  361. package/dist/esm/tasks/object-detection/inference.d.ts.map +1 -0
  362. package/dist/esm/tasks/object-detection/inference.js +1 -0
  363. package/dist/esm/tasks/placeholder/data.d.ts +4 -0
  364. package/dist/esm/tasks/placeholder/data.d.ts.map +1 -0
  365. package/dist/esm/tasks/placeholder/data.js +18 -0
  366. package/dist/esm/tasks/question-answering/data.d.ts +4 -0
  367. package/dist/esm/tasks/question-answering/data.d.ts.map +1 -0
  368. package/dist/esm/tasks/question-answering/data.js +69 -0
  369. package/dist/esm/tasks/question-answering/inference.d.ts +100 -0
  370. package/dist/esm/tasks/question-answering/inference.d.ts.map +1 -0
  371. package/dist/esm/tasks/question-answering/inference.js +1 -0
  372. package/dist/esm/tasks/reinforcement-learning/data.d.ts +4 -0
  373. package/dist/esm/tasks/reinforcement-learning/data.d.ts.map +1 -0
  374. package/dist/esm/tasks/reinforcement-learning/data.js +67 -0
  375. package/dist/esm/tasks/sentence-similarity/data.d.ts +4 -0
  376. package/dist/esm/tasks/sentence-similarity/data.d.ts.map +1 -0
  377. package/dist/esm/tasks/sentence-similarity/data.js +93 -0
  378. package/dist/esm/tasks/sentence-similarity/inference.d.ts +32 -0
  379. package/dist/esm/tasks/sentence-similarity/inference.d.ts.map +1 -0
  380. package/dist/esm/tasks/sentence-similarity/inference.js +6 -0
  381. package/dist/esm/tasks/summarization/data.d.ts +4 -0
  382. package/dist/esm/tasks/summarization/data.d.ts.map +1 -0
  383. package/dist/esm/tasks/summarization/data.js +67 -0
  384. package/dist/esm/tasks/summarization/inference.d.ts +56 -0
  385. package/dist/esm/tasks/summarization/inference.d.ts.map +1 -0
  386. package/dist/esm/tasks/summarization/inference.js +6 -0
  387. package/dist/esm/tasks/table-question-answering/data.d.ts +4 -0
  388. package/dist/esm/tasks/table-question-answering/data.d.ts.map +1 -0
  389. package/dist/esm/tasks/table-question-answering/data.js +52 -0
  390. package/dist/esm/tasks/table-question-answering/inference.d.ts +62 -0
  391. package/dist/esm/tasks/table-question-answering/inference.d.ts.map +1 -0
  392. package/dist/esm/tasks/table-question-answering/inference.js +1 -0
  393. package/dist/esm/tasks/tabular-classification/data.d.ts +4 -0
  394. package/dist/esm/tasks/tabular-classification/data.d.ts.map +1 -0
  395. package/dist/esm/tasks/tabular-classification/data.js +65 -0
  396. package/dist/esm/tasks/tabular-regression/data.d.ts +4 -0
  397. package/dist/esm/tasks/tabular-regression/data.d.ts.map +1 -0
  398. package/dist/esm/tasks/tabular-regression/data.js +53 -0
  399. package/dist/esm/tasks/text-classification/data.d.ts +4 -0
  400. package/dist/esm/tasks/text-classification/data.d.ts.map +1 -0
  401. package/dist/esm/tasks/text-classification/data.js +98 -0
  402. package/dist/esm/tasks/text-classification/inference.d.ts +52 -0
  403. package/dist/esm/tasks/text-classification/inference.d.ts.map +1 -0
  404. package/dist/esm/tasks/text-classification/inference.js +1 -0
  405. package/dist/esm/tasks/text-generation/data.d.ts +4 -0
  406. package/dist/esm/tasks/text-generation/data.d.ts.map +1 -0
  407. package/dist/esm/tasks/text-generation/data.js +106 -0
  408. package/dist/esm/tasks/text-generation/inference.d.ts +188 -0
  409. package/dist/esm/tasks/text-generation/inference.d.ts.map +1 -0
  410. package/dist/esm/tasks/text-generation/inference.js +6 -0
  411. package/dist/esm/tasks/text-to-3d/data.d.ts +4 -0
  412. package/dist/esm/tasks/text-to-3d/data.d.ts.map +1 -0
  413. package/dist/esm/tasks/text-to-3d/data.js +53 -0
  414. package/dist/esm/tasks/text-to-audio/inference.d.ts +139 -0
  415. package/dist/esm/tasks/text-to-audio/inference.d.ts.map +1 -0
  416. package/dist/esm/tasks/text-to-audio/inference.js +6 -0
  417. package/dist/esm/tasks/text-to-image/data.d.ts +4 -0
  418. package/dist/esm/tasks/text-to-image/data.d.ts.map +1 -0
  419. package/dist/esm/tasks/text-to-image/data.js +93 -0
  420. package/dist/esm/tasks/text-to-image/inference.d.ts +72 -0
  421. package/dist/esm/tasks/text-to-image/inference.d.ts.map +1 -0
  422. package/dist/esm/tasks/text-to-image/inference.js +6 -0
  423. package/dist/esm/tasks/text-to-speech/data.d.ts +4 -0
  424. package/dist/esm/tasks/text-to-speech/data.d.ts.map +1 -0
  425. package/dist/esm/tasks/text-to-speech/data.js +74 -0
  426. package/dist/esm/tasks/text-to-speech/inference.d.ts +141 -0
  427. package/dist/esm/tasks/text-to-speech/inference.d.ts.map +1 -0
  428. package/dist/esm/tasks/text-to-speech/inference.js +6 -0
  429. package/dist/esm/tasks/text-to-video/data.d.ts +4 -0
  430. package/dist/esm/tasks/text-to-video/data.d.ts.map +1 -0
  431. package/dist/esm/tasks/text-to-video/data.js +93 -0
  432. package/dist/esm/tasks/text2text-generation/inference.d.ts +54 -0
  433. package/dist/esm/tasks/text2text-generation/inference.d.ts.map +1 -0
  434. package/dist/esm/tasks/text2text-generation/inference.js +6 -0
  435. package/dist/esm/tasks/token-classification/data.d.ts +4 -0
  436. package/dist/esm/tasks/token-classification/data.d.ts.map +1 -0
  437. package/dist/esm/tasks/token-classification/data.js +85 -0
  438. package/dist/esm/tasks/token-classification/inference.d.ts +86 -0
  439. package/dist/esm/tasks/token-classification/inference.d.ts.map +1 -0
  440. package/dist/esm/tasks/token-classification/inference.js +1 -0
  441. package/dist/esm/tasks/translation/data.d.ts +4 -0
  442. package/dist/esm/tasks/translation/data.d.ts.map +1 -0
  443. package/dist/esm/tasks/translation/data.js +63 -0
  444. package/dist/esm/tasks/translation/inference.d.ts +66 -0
  445. package/dist/esm/tasks/translation/inference.d.ts.map +1 -0
  446. package/dist/esm/tasks/translation/inference.js +6 -0
  447. package/dist/esm/tasks/unconditional-image-generation/data.d.ts +4 -0
  448. package/dist/esm/tasks/unconditional-image-generation/data.d.ts.map +1 -0
  449. package/dist/esm/tasks/unconditional-image-generation/data.js +63 -0
  450. package/dist/esm/tasks/video-classification/data.d.ts +4 -0
  451. package/dist/esm/tasks/video-classification/data.d.ts.map +1 -0
  452. package/dist/esm/tasks/video-classification/data.js +80 -0
  453. package/dist/esm/tasks/video-classification/inference.d.ts +60 -0
  454. package/dist/esm/tasks/video-classification/inference.d.ts.map +1 -0
  455. package/dist/esm/tasks/video-classification/inference.js +1 -0
  456. package/dist/esm/tasks/video-text-to-text/data.d.ts +4 -0
  457. package/dist/esm/tasks/video-text-to-text/data.d.ts.map +1 -0
  458. package/dist/esm/tasks/video-text-to-text/data.js +61 -0
  459. package/dist/esm/tasks/visual-question-answering/data.d.ts +4 -0
  460. package/dist/esm/tasks/visual-question-answering/data.d.ts.map +1 -0
  461. package/dist/esm/tasks/visual-question-answering/data.js +91 -0
  462. package/dist/esm/tasks/visual-question-answering/inference.d.ts +63 -0
  463. package/dist/esm/tasks/visual-question-answering/inference.d.ts.map +1 -0
  464. package/dist/esm/tasks/visual-question-answering/inference.js +1 -0
  465. package/dist/esm/tasks/zero-shot-classification/data.d.ts +4 -0
  466. package/dist/esm/tasks/zero-shot-classification/data.d.ts.map +1 -0
  467. package/dist/esm/tasks/zero-shot-classification/data.js +64 -0
  468. package/dist/esm/tasks/zero-shot-classification/inference.d.ts +68 -0
  469. package/dist/esm/tasks/zero-shot-classification/inference.d.ts.map +1 -0
  470. package/dist/esm/tasks/zero-shot-classification/inference.js +1 -0
  471. package/dist/esm/tasks/zero-shot-image-classification/data.d.ts +4 -0
  472. package/dist/esm/tasks/zero-shot-image-classification/data.d.ts.map +1 -0
  473. package/dist/esm/tasks/zero-shot-image-classification/data.js +79 -0
  474. package/dist/esm/tasks/zero-shot-image-classification/inference.d.ts +62 -0
  475. package/dist/esm/tasks/zero-shot-image-classification/inference.d.ts.map +1 -0
  476. package/dist/esm/tasks/zero-shot-image-classification/inference.js +1 -0
  477. package/dist/esm/tasks/zero-shot-object-detection/data.d.ts +4 -0
  478. package/dist/esm/tasks/zero-shot-object-detection/data.d.ts.map +1 -0
  479. package/dist/esm/tasks/zero-shot-object-detection/data.js +60 -0
  480. package/dist/esm/tasks/zero-shot-object-detection/inference.d.ts +67 -0
  481. package/dist/esm/tasks/zero-shot-object-detection/inference.d.ts.map +1 -0
  482. package/dist/esm/tasks/zero-shot-object-detection/inference.js +1 -0
  483. package/dist/esm/tokenizer-data.d.ts +26 -0
  484. package/dist/esm/tokenizer-data.d.ts.map +1 -0
  485. package/dist/esm/tokenizer-data.js +10 -0
  486. package/dist/esm/widget-example.d.ts +83 -0
  487. package/dist/esm/widget-example.d.ts.map +1 -0
  488. package/dist/esm/widget-example.js +4 -0
  489. package/package.json +24 -20
  490. package/src/default-widget-inputs.ts +2 -2
  491. package/src/index.ts +23 -19
  492. package/src/library-to-tasks.ts +2 -2
  493. package/src/local-apps.ts +3 -3
  494. package/src/model-data.ts +3 -3
  495. package/src/model-libraries-snippets.ts +3 -3
  496. package/src/model-libraries.ts +3 -3
  497. package/src/snippets/common.ts +1 -1
  498. package/src/snippets/curl.spec.ts +2 -2
  499. package/src/snippets/index.ts +5 -4
  500. package/src/snippets/inputs.ts +3 -3
  501. package/src/snippets/js.spec.ts +10 -10
  502. package/src/snippets/js.ts +8 -8
  503. package/src/snippets/python.spec.ts +39 -2
  504. package/src/snippets/python.ts +22 -5
  505. package/src/snippets/types.ts +1 -1
  506. package/src/tasks/audio-classification/data.ts +1 -1
  507. package/src/tasks/audio-to-audio/data.ts +1 -1
  508. package/src/tasks/automatic-speech-recognition/data.ts +1 -1
  509. package/src/tasks/depth-estimation/data.ts +1 -1
  510. package/src/tasks/document-question-answering/data.ts +1 -1
  511. package/src/tasks/feature-extraction/data.ts +1 -1
  512. package/src/tasks/fill-mask/data.ts +1 -1
  513. package/src/tasks/image-classification/data.ts +1 -1
  514. package/src/tasks/image-feature-extraction/data.ts +1 -1
  515. package/src/tasks/image-segmentation/data.ts +1 -1
  516. package/src/tasks/image-text-to-text/data.ts +1 -1
  517. package/src/tasks/image-to-3d/data.ts +1 -1
  518. package/src/tasks/image-to-image/data.ts +1 -1
  519. package/src/tasks/image-to-text/data.ts +1 -1
  520. package/src/tasks/index.ts +70 -70
  521. package/src/tasks/keypoint-detection/data.ts +1 -1
  522. package/src/tasks/mask-generation/data.ts +1 -1
  523. package/src/tasks/object-detection/data.ts +1 -1
  524. package/src/tasks/placeholder/data.ts +1 -1
  525. package/src/tasks/question-answering/data.ts +1 -1
  526. package/src/tasks/reinforcement-learning/data.ts +1 -1
  527. package/src/tasks/sentence-similarity/data.ts +1 -1
  528. package/src/tasks/summarization/data.ts +1 -1
  529. package/src/tasks/table-question-answering/data.ts +1 -1
  530. package/src/tasks/tabular-classification/data.ts +1 -1
  531. package/src/tasks/tabular-regression/data.ts +1 -1
  532. package/src/tasks/text-classification/data.ts +1 -1
  533. package/src/tasks/text-generation/data.ts +1 -1
  534. package/src/tasks/text-to-3d/data.ts +1 -1
  535. package/src/tasks/text-to-image/data.ts +1 -1
  536. package/src/tasks/text-to-speech/data.ts +1 -1
  537. package/src/tasks/text-to-video/data.ts +1 -1
  538. package/src/tasks/token-classification/data.ts +1 -1
  539. package/src/tasks/translation/data.ts +1 -1
  540. package/src/tasks/unconditional-image-generation/data.ts +1 -1
  541. package/src/tasks/video-classification/data.ts +1 -1
  542. package/src/tasks/video-text-to-text/data.ts +1 -1
  543. package/src/tasks/visual-question-answering/data.ts +1 -1
  544. package/src/tasks/zero-shot-classification/data.ts +1 -1
  545. package/src/tasks/zero-shot-image-classification/data.ts +1 -1
  546. package/src/tasks/zero-shot-object-detection/data.ts +1 -1
  547. package/src/widget-example.ts +1 -1
  548. package/tsconfig.json +3 -3
  549. package/dist/index.cjs +0 -7976
  550. package/dist/index.js +0 -7933
  551. package/dist/scripts/inference-codegen.d.ts +0 -2
  552. package/dist/scripts/inference-codegen.d.ts.map +0 -1
  553. package/dist/scripts/inference-tei-import.d.ts +0 -2
  554. package/dist/scripts/inference-tei-import.d.ts.map +0 -1
  555. package/dist/scripts/inference-tgi-import.d.ts +0 -2
  556. package/dist/scripts/inference-tgi-import.d.ts.map +0 -1
  557. package/dist/src/default-widget-inputs.d.ts.map +0 -1
  558. package/dist/src/index.d.ts.map +0 -1
  559. package/dist/src/library-to-tasks.d.ts.map +0 -1
  560. package/dist/src/local-apps.d.ts.map +0 -1
  561. package/dist/src/model-data.d.ts.map +0 -1
  562. package/dist/src/model-libraries-snippets.d.ts.map +0 -1
  563. package/dist/src/snippets/common.d.ts.map +0 -1
  564. package/dist/src/snippets/index.d.ts +0 -6
  565. package/dist/src/snippets/index.d.ts.map +0 -1
  566. package/dist/src/snippets/inputs.d.ts +0 -4
  567. package/dist/src/snippets/inputs.d.ts.map +0 -1
  568. package/dist/src/snippets/types.d.ts.map +0 -1
  569. package/dist/src/tasks/audio-classification/data.d.ts +0 -4
  570. package/dist/src/tasks/audio-to-audio/data.d.ts +0 -4
  571. package/dist/src/tasks/automatic-speech-recognition/data.d.ts +0 -4
  572. package/dist/src/tasks/depth-estimation/data.d.ts +0 -4
  573. package/dist/src/tasks/document-question-answering/data.d.ts +0 -4
  574. package/dist/src/tasks/feature-extraction/data.d.ts +0 -4
  575. package/dist/src/tasks/fill-mask/data.d.ts +0 -4
  576. package/dist/src/tasks/image-classification/data.d.ts +0 -4
  577. package/dist/src/tasks/image-feature-extraction/data.d.ts +0 -4
  578. package/dist/src/tasks/image-segmentation/data.d.ts +0 -4
  579. package/dist/src/tasks/image-text-to-text/data.d.ts +0 -4
  580. package/dist/src/tasks/image-to-3d/data.d.ts +0 -4
  581. package/dist/src/tasks/image-to-image/data.d.ts +0 -4
  582. package/dist/src/tasks/image-to-text/data.d.ts +0 -4
  583. package/dist/src/tasks/index.d.ts.map +0 -1
  584. package/dist/src/tasks/keypoint-detection/data.d.ts +0 -4
  585. package/dist/src/tasks/mask-generation/data.d.ts +0 -4
  586. package/dist/src/tasks/object-detection/data.d.ts +0 -4
  587. package/dist/src/tasks/placeholder/data.d.ts +0 -4
  588. package/dist/src/tasks/question-answering/data.d.ts +0 -4
  589. package/dist/src/tasks/reinforcement-learning/data.d.ts +0 -4
  590. package/dist/src/tasks/sentence-similarity/data.d.ts +0 -4
  591. package/dist/src/tasks/summarization/data.d.ts +0 -4
  592. package/dist/src/tasks/table-question-answering/data.d.ts +0 -4
  593. package/dist/src/tasks/tabular-classification/data.d.ts +0 -4
  594. package/dist/src/tasks/tabular-regression/data.d.ts +0 -4
  595. package/dist/src/tasks/text-classification/data.d.ts +0 -4
  596. package/dist/src/tasks/text-generation/data.d.ts +0 -4
  597. package/dist/src/tasks/text-to-3d/data.d.ts +0 -4
  598. package/dist/src/tasks/text-to-image/data.d.ts +0 -4
  599. package/dist/src/tasks/text-to-speech/data.d.ts +0 -4
  600. package/dist/src/tasks/text-to-video/data.d.ts +0 -4
  601. package/dist/src/tasks/token-classification/data.d.ts +0 -4
  602. package/dist/src/tasks/translation/data.d.ts +0 -4
  603. package/dist/src/tasks/unconditional-image-generation/data.d.ts +0 -4
  604. package/dist/src/tasks/video-classification/data.d.ts +0 -4
  605. package/dist/src/tasks/video-text-to-text/data.d.ts +0 -4
  606. package/dist/src/tasks/visual-question-answering/data.d.ts +0 -4
  607. package/dist/src/tasks/zero-shot-classification/data.d.ts +0 -4
  608. package/dist/src/tasks/zero-shot-image-classification/data.d.ts +0 -4
  609. package/dist/src/tasks/zero-shot-object-detection/data.d.ts +0 -4
  610. package/dist/src/widget-example.d.ts.map +0 -1
  611. /package/dist/{src → commonjs}/dataset-libraries.d.ts +0 -0
  612. /package/dist/{src → commonjs}/dataset-libraries.d.ts.map +0 -0
  613. /package/dist/{src → commonjs}/gguf.d.ts +0 -0
  614. /package/dist/{src → commonjs}/gguf.d.ts.map +0 -0
  615. /package/dist/{src → commonjs}/hardware.d.ts +0 -0
  616. /package/dist/{src → commonjs}/hardware.d.ts.map +0 -0
  617. /package/dist/{src → commonjs}/model-libraries-downloads.d.ts +0 -0
  618. /package/dist/{src → commonjs}/model-libraries-downloads.d.ts.map +0 -0
  619. /package/dist/{src → commonjs}/snippets/curl.d.ts +0 -0
  620. /package/dist/{src → commonjs}/snippets/curl.d.ts.map +0 -0
  621. /package/dist/{src → commonjs}/snippets/curl.spec.d.ts +0 -0
  622. /package/dist/{src → commonjs}/snippets/curl.spec.d.ts.map +0 -0
  623. /package/dist/{src → commonjs}/snippets/js.d.ts +0 -0
  624. /package/dist/{src → commonjs}/snippets/js.d.ts.map +0 -0
  625. /package/dist/{src → commonjs}/snippets/js.spec.d.ts +0 -0
  626. /package/dist/{src → commonjs}/snippets/js.spec.d.ts.map +0 -0
  627. /package/dist/{src → commonjs}/snippets/python.spec.d.ts +0 -0
  628. /package/dist/{src → commonjs}/snippets/python.spec.d.ts.map +0 -0
  629. /package/dist/{src → commonjs}/tasks/audio-classification/inference.d.ts +0 -0
  630. /package/dist/{src → commonjs}/tasks/audio-classification/inference.d.ts.map +0 -0
  631. /package/dist/{src → commonjs}/tasks/automatic-speech-recognition/inference.d.ts +0 -0
  632. /package/dist/{src → commonjs}/tasks/automatic-speech-recognition/inference.d.ts.map +0 -0
  633. /package/dist/{src → commonjs}/tasks/chat-completion/inference.d.ts +0 -0
  634. /package/dist/{src → commonjs}/tasks/chat-completion/inference.d.ts.map +0 -0
  635. /package/dist/{src → commonjs}/tasks/depth-estimation/inference.d.ts +0 -0
  636. /package/dist/{src → commonjs}/tasks/depth-estimation/inference.d.ts.map +0 -0
  637. /package/dist/{src → commonjs}/tasks/document-question-answering/inference.d.ts +0 -0
  638. /package/dist/{src → commonjs}/tasks/document-question-answering/inference.d.ts.map +0 -0
  639. /package/dist/{src → commonjs}/tasks/feature-extraction/inference.d.ts +0 -0
  640. /package/dist/{src → commonjs}/tasks/feature-extraction/inference.d.ts.map +0 -0
  641. /package/dist/{src → commonjs}/tasks/fill-mask/inference.d.ts +0 -0
  642. /package/dist/{src → commonjs}/tasks/fill-mask/inference.d.ts.map +0 -0
  643. /package/dist/{src → commonjs}/tasks/image-classification/inference.d.ts +0 -0
  644. /package/dist/{src → commonjs}/tasks/image-classification/inference.d.ts.map +0 -0
  645. /package/dist/{src → commonjs}/tasks/image-segmentation/inference.d.ts +0 -0
  646. /package/dist/{src → commonjs}/tasks/image-segmentation/inference.d.ts.map +0 -0
  647. /package/dist/{src → commonjs}/tasks/image-to-image/inference.d.ts +0 -0
  648. /package/dist/{src → commonjs}/tasks/image-to-image/inference.d.ts.map +0 -0
  649. /package/dist/{src → commonjs}/tasks/image-to-text/inference.d.ts +0 -0
  650. /package/dist/{src → commonjs}/tasks/image-to-text/inference.d.ts.map +0 -0
  651. /package/dist/{src → commonjs}/tasks/object-detection/inference.d.ts +0 -0
  652. /package/dist/{src → commonjs}/tasks/object-detection/inference.d.ts.map +0 -0
  653. /package/dist/{src → commonjs}/tasks/question-answering/inference.d.ts +0 -0
  654. /package/dist/{src → commonjs}/tasks/question-answering/inference.d.ts.map +0 -0
  655. /package/dist/{src → commonjs}/tasks/sentence-similarity/inference.d.ts +0 -0
  656. /package/dist/{src → commonjs}/tasks/sentence-similarity/inference.d.ts.map +0 -0
  657. /package/dist/{src → commonjs}/tasks/summarization/inference.d.ts +0 -0
  658. /package/dist/{src → commonjs}/tasks/summarization/inference.d.ts.map +0 -0
  659. /package/dist/{src → commonjs}/tasks/table-question-answering/inference.d.ts +0 -0
  660. /package/dist/{src → commonjs}/tasks/table-question-answering/inference.d.ts.map +0 -0
  661. /package/dist/{src → commonjs}/tasks/text-classification/inference.d.ts +0 -0
  662. /package/dist/{src → commonjs}/tasks/text-classification/inference.d.ts.map +0 -0
  663. /package/dist/{src → commonjs}/tasks/text-generation/inference.d.ts +0 -0
  664. /package/dist/{src → commonjs}/tasks/text-generation/inference.d.ts.map +0 -0
  665. /package/dist/{src → commonjs}/tasks/text-to-audio/inference.d.ts +0 -0
  666. /package/dist/{src → commonjs}/tasks/text-to-audio/inference.d.ts.map +0 -0
  667. /package/dist/{src → commonjs}/tasks/text-to-image/inference.d.ts +0 -0
  668. /package/dist/{src → commonjs}/tasks/text-to-image/inference.d.ts.map +0 -0
  669. /package/dist/{src → commonjs}/tasks/text-to-speech/inference.d.ts +0 -0
  670. /package/dist/{src → commonjs}/tasks/text-to-speech/inference.d.ts.map +0 -0
  671. /package/dist/{src → commonjs}/tasks/text2text-generation/inference.d.ts +0 -0
  672. /package/dist/{src → commonjs}/tasks/text2text-generation/inference.d.ts.map +0 -0
  673. /package/dist/{src → commonjs}/tasks/token-classification/inference.d.ts +0 -0
  674. /package/dist/{src → commonjs}/tasks/token-classification/inference.d.ts.map +0 -0
  675. /package/dist/{src → commonjs}/tasks/translation/inference.d.ts +0 -0
  676. /package/dist/{src → commonjs}/tasks/translation/inference.d.ts.map +0 -0
  677. /package/dist/{src → commonjs}/tasks/video-classification/inference.d.ts +0 -0
  678. /package/dist/{src → commonjs}/tasks/video-classification/inference.d.ts.map +0 -0
  679. /package/dist/{src → commonjs}/tasks/visual-question-answering/inference.d.ts +0 -0
  680. /package/dist/{src → commonjs}/tasks/visual-question-answering/inference.d.ts.map +0 -0
  681. /package/dist/{src → commonjs}/tasks/zero-shot-classification/inference.d.ts +0 -0
  682. /package/dist/{src → commonjs}/tasks/zero-shot-classification/inference.d.ts.map +0 -0
  683. /package/dist/{src → commonjs}/tasks/zero-shot-image-classification/inference.d.ts +0 -0
  684. /package/dist/{src → commonjs}/tasks/zero-shot-image-classification/inference.d.ts.map +0 -0
  685. /package/dist/{src → commonjs}/tasks/zero-shot-object-detection/inference.d.ts +0 -0
  686. /package/dist/{src → commonjs}/tasks/zero-shot-object-detection/inference.d.ts.map +0 -0
  687. /package/dist/{src → commonjs}/tokenizer-data.d.ts +0 -0
  688. /package/dist/{src → commonjs}/tokenizer-data.d.ts.map +0 -0
@@ -0,0 +1,53 @@
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
+ }
53
+ //# sourceMappingURL=inference.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"inference.d.ts","sourceRoot":"","sources":["../../../../src/tasks/audio-classification/inference.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH;;GAEG;AACH,MAAM,WAAW,wBAAwB;IACxC;;;OAGG;IACH,MAAM,EAAE,MAAM,CAAC;IACf;;OAEG;IACH,UAAU,CAAC,EAAE,6BAA6B,CAAC;IAC3C,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC;CAC5B;AACD;;;;GAIG;AACH,MAAM,WAAW,6BAA6B;IAC7C,iBAAiB,CAAC,EAAE,6BAA6B,CAAC;IAClD;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC;CAC5B;AACD;;GAEG;AACH,MAAM,MAAM,6BAA6B,GAAG,SAAS,GAAG,SAAS,GAAG,MAAM,CAAC;AAC3E,MAAM,MAAM,yBAAyB,GAAG,gCAAgC,EAAE,CAAC;AAC3E;;GAEG;AACH,MAAM,WAAW,gCAAgC;IAChD;;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 @@
1
+ export {};
@@ -0,0 +1,4 @@
1
+ import type { TaskDataCustom } from "../index.js";
2
+ declare const taskData: TaskDataCustom;
3
+ export default taskData;
4
+ //# sourceMappingURL=data.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"data.d.ts","sourceRoot":"","sources":["../../../../src/tasks/audio-to-audio/data.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAElD,QAAA,MAAM,QAAQ,EAAE,cAiEf,CAAC;AAEF,eAAe,QAAQ,CAAC"}
@@ -0,0 +1,64 @@
1
+ const taskData = {
2
+ datasets: [
3
+ {
4
+ description: "512-element X-vector embeddings of speakers from CMU ARCTIC dataset.",
5
+ id: "Matthijs/cmu-arctic-xvectors",
6
+ },
7
+ ],
8
+ demo: {
9
+ inputs: [
10
+ {
11
+ filename: "input.wav",
12
+ type: "audio",
13
+ },
14
+ ],
15
+ outputs: [
16
+ {
17
+ filename: "label-0.wav",
18
+ type: "audio",
19
+ },
20
+ {
21
+ filename: "label-1.wav",
22
+ type: "audio",
23
+ },
24
+ ],
25
+ },
26
+ metrics: [
27
+ {
28
+ description: "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.",
29
+ id: "snri",
30
+ },
31
+ {
32
+ description: "The Signal-to-Distortion ratio is the relationship between the target signal and the sum of noise, interference, and artifact errors",
33
+ id: "sdri",
34
+ },
35
+ ],
36
+ models: [
37
+ {
38
+ description: "A solid model of audio source separation.",
39
+ id: "speechbrain/sepformer-wham",
40
+ },
41
+ {
42
+ description: "A speech enhancement model.",
43
+ id: "ResembleAI/resemble-enhance",
44
+ },
45
+ {
46
+ description: "A model that can change the voice in a speech recording.",
47
+ id: "microsoft/speecht5_vc",
48
+ },
49
+ ],
50
+ spaces: [
51
+ {
52
+ description: "An application for speech separation.",
53
+ id: "younver/speechbrain-speech-separation",
54
+ },
55
+ {
56
+ description: "An application for audio style transfer.",
57
+ id: "nakas/audio-diffusion_style_transfer",
58
+ },
59
+ ],
60
+ summary: "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.",
61
+ widgetModels: ["speechbrain/sepformer-wham"],
62
+ youtubeId: "iohj7nCCYoM",
63
+ };
64
+ export default taskData;
@@ -0,0 +1,4 @@
1
+ import type { TaskDataCustom } from "../index.js";
2
+ declare const taskData: TaskDataCustom;
3
+ export default taskData;
4
+ //# sourceMappingURL=data.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"data.d.ts","sourceRoot":"","sources":["../../../../src/tasks/automatic-speech-recognition/data.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAElD,QAAA,MAAM,QAAQ,EAAE,cA6Ef,CAAC;AAEF,eAAe,QAAQ,CAAC"}
@@ -0,0 +1,78 @@
1
+ const taskData = {
2
+ datasets: [
3
+ {
4
+ description: "31,175 hours of multilingual audio-text dataset in 108 languages.",
5
+ id: "mozilla-foundation/common_voice_17_0",
6
+ },
7
+ {
8
+ description: "A dataset with 44.6k hours of English speaker data and 6k hours of other language speakers.",
9
+ id: "parler-tts/mls_eng",
10
+ },
11
+ {
12
+ description: "A multi-lingual audio dataset with 370K hours of audio.",
13
+ id: "espnet/yodas",
14
+ },
15
+ ],
16
+ demo: {
17
+ inputs: [
18
+ {
19
+ filename: "input.flac",
20
+ type: "audio",
21
+ },
22
+ ],
23
+ outputs: [
24
+ {
25
+ /// GOING ALONG SLUSHY COUNTRY ROADS AND SPEAKING TO DAMP AUDIENCES I
26
+ label: "Transcript",
27
+ content: "Going along slushy country roads and speaking to damp audiences in...",
28
+ type: "text",
29
+ },
30
+ ],
31
+ },
32
+ metrics: [
33
+ {
34
+ description: "",
35
+ id: "wer",
36
+ },
37
+ {
38
+ description: "",
39
+ id: "cer",
40
+ },
41
+ ],
42
+ models: [
43
+ {
44
+ description: "A powerful ASR model by OpenAI.",
45
+ id: "openai/whisper-large-v3",
46
+ },
47
+ {
48
+ description: "A good generic speech model by MetaAI for fine-tuning.",
49
+ id: "facebook/w2v-bert-2.0",
50
+ },
51
+ {
52
+ description: "An end-to-end model that performs ASR and Speech Translation by MetaAI.",
53
+ id: "facebook/seamless-m4t-v2-large",
54
+ },
55
+ {
56
+ description: "Powerful speaker diarization model.",
57
+ id: "pyannote/speaker-diarization-3.1",
58
+ },
59
+ ],
60
+ spaces: [
61
+ {
62
+ description: "A powerful general-purpose speech recognition application.",
63
+ id: "hf-audio/whisper-large-v3",
64
+ },
65
+ {
66
+ description: "Fastest speech recognition application.",
67
+ id: "sanchit-gandhi/whisper-jax",
68
+ },
69
+ {
70
+ description: "A high quality speech and text translation model by Meta.",
71
+ id: "facebook/seamless_m4t",
72
+ },
73
+ ],
74
+ summary: "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.",
75
+ widgetModels: ["openai/whisper-large-v3"],
76
+ youtubeId: "TksaY_FDgnk",
77
+ };
78
+ export default taskData;
@@ -0,0 +1,155 @@
1
+ /**
2
+ * Inference code generated from the JSON schema spec in ./spec
3
+ *
4
+ * Using src/scripts/inference-codegen
5
+ */
6
+ /**
7
+ * Inputs for Automatic Speech Recognition inference
8
+ */
9
+ export interface AutomaticSpeechRecognitionInput {
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?: AutomaticSpeechRecognitionParameters;
19
+ [property: string]: unknown;
20
+ }
21
+ /**
22
+ * Additional inference parameters
23
+ *
24
+ * Additional inference parameters for Automatic Speech Recognition
25
+ */
26
+ export interface AutomaticSpeechRecognitionParameters {
27
+ /**
28
+ * Parametrization of the text generation process
29
+ */
30
+ generation_parameters?: GenerationParameters;
31
+ /**
32
+ * Whether to output corresponding timestamps with the generated text
33
+ */
34
+ return_timestamps?: boolean;
35
+ [property: string]: unknown;
36
+ }
37
+ /**
38
+ * Parametrization of the text generation process
39
+ *
40
+ * Ad-hoc parametrization of the text generation process
41
+ */
42
+ export interface GenerationParameters {
43
+ /**
44
+ * Whether to use sampling instead of greedy decoding when generating new tokens.
45
+ */
46
+ do_sample?: boolean;
47
+ /**
48
+ * Controls the stopping condition for beam-based methods.
49
+ */
50
+ early_stopping?: EarlyStoppingUnion;
51
+ /**
52
+ * If set to float strictly between 0 and 1, only tokens with a conditional probability
53
+ * greater than epsilon_cutoff will be sampled. In the paper, suggested values range from
54
+ * 3e-4 to 9e-4, depending on the size of the model. See [Truncation Sampling as Language
55
+ * Model Desmoothing](https://hf.co/papers/2210.15191) for more details.
56
+ */
57
+ epsilon_cutoff?: number;
58
+ /**
59
+ * Eta sampling is a hybrid of locally typical sampling and epsilon sampling. If set to
60
+ * float strictly between 0 and 1, a token is only considered if it is greater than either
61
+ * eta_cutoff or sqrt(eta_cutoff) * exp(-entropy(softmax(next_token_logits))). The latter
62
+ * term is intuitively the expected next token probability, scaled by sqrt(eta_cutoff). In
63
+ * the paper, suggested values range from 3e-4 to 2e-3, depending on the size of the model.
64
+ * See [Truncation Sampling as Language Model Desmoothing](https://hf.co/papers/2210.15191)
65
+ * for more details.
66
+ */
67
+ eta_cutoff?: number;
68
+ /**
69
+ * The maximum length (in tokens) of the generated text, including the input.
70
+ */
71
+ max_length?: number;
72
+ /**
73
+ * The maximum number of tokens to generate. Takes precedence over max_length.
74
+ */
75
+ max_new_tokens?: number;
76
+ /**
77
+ * The minimum length (in tokens) of the generated text, including the input.
78
+ */
79
+ min_length?: number;
80
+ /**
81
+ * The minimum number of tokens to generate. Takes precedence over min_length.
82
+ */
83
+ min_new_tokens?: number;
84
+ /**
85
+ * Number of groups to divide num_beams into in order to ensure diversity among different
86
+ * groups of beams. See [this paper](https://hf.co/papers/1610.02424) for more details.
87
+ */
88
+ num_beam_groups?: number;
89
+ /**
90
+ * Number of beams to use for beam search.
91
+ */
92
+ num_beams?: number;
93
+ /**
94
+ * The value balances the model confidence and the degeneration penalty in contrastive
95
+ * search decoding.
96
+ */
97
+ penalty_alpha?: number;
98
+ /**
99
+ * The value used to modulate the next token probabilities.
100
+ */
101
+ temperature?: number;
102
+ /**
103
+ * The number of highest probability vocabulary tokens to keep for top-k-filtering.
104
+ */
105
+ top_k?: number;
106
+ /**
107
+ * If set to float < 1, only the smallest set of most probable tokens with probabilities
108
+ * that add up to top_p or higher are kept for generation.
109
+ */
110
+ top_p?: number;
111
+ /**
112
+ * Local typicality measures how similar the conditional probability of predicting a target
113
+ * token next is to the expected conditional probability of predicting a random token next,
114
+ * given the partial text already generated. If set to float < 1, the smallest set of the
115
+ * most locally typical tokens with probabilities that add up to typical_p or higher are
116
+ * kept for generation. See [this paper](https://hf.co/papers/2202.00666) for more details.
117
+ */
118
+ typical_p?: number;
119
+ /**
120
+ * Whether the model should use the past last key/values attentions to speed up decoding
121
+ */
122
+ use_cache?: boolean;
123
+ [property: string]: unknown;
124
+ }
125
+ /**
126
+ * Controls the stopping condition for beam-based methods.
127
+ */
128
+ export type EarlyStoppingUnion = boolean | "never";
129
+ /**
130
+ * Outputs of inference for the Automatic Speech Recognition task
131
+ */
132
+ export interface AutomaticSpeechRecognitionOutput {
133
+ /**
134
+ * When returnTimestamps is enabled, chunks contains a list of audio chunks identified by
135
+ * the model.
136
+ */
137
+ chunks?: AutomaticSpeechRecognitionOutputChunk[];
138
+ /**
139
+ * The recognized text.
140
+ */
141
+ text: string;
142
+ [property: string]: unknown;
143
+ }
144
+ export interface AutomaticSpeechRecognitionOutputChunk {
145
+ /**
146
+ * A chunk of text identified by the model
147
+ */
148
+ text: string;
149
+ /**
150
+ * The start and end timestamps corresponding with the text
151
+ */
152
+ timestamps: number[];
153
+ [property: string]: unknown;
154
+ }
155
+ //# sourceMappingURL=inference.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"inference.d.ts","sourceRoot":"","sources":["../../../../src/tasks/automatic-speech-recognition/inference.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH;;GAEG;AACH,MAAM,WAAW,+BAA+B;IAC/C;;;OAGG;IACH,MAAM,EAAE,MAAM,CAAC;IACf;;OAEG;IACH,UAAU,CAAC,EAAE,oCAAoC,CAAC;IAClD,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC;CAC5B;AAED;;;;GAIG;AACH,MAAM,WAAW,oCAAoC;IACpD;;OAEG;IACH,qBAAqB,CAAC,EAAE,oBAAoB,CAAC;IAC7C;;OAEG;IACH,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC;CAC5B;AAED;;;;GAIG;AACH,MAAM,WAAW,oBAAoB;IACpC;;OAEG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB;;OAEG;IACH,cAAc,CAAC,EAAE,kBAAkB,CAAC;IACpC;;;;;OAKG;IACH,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB;;;;;;;;OAQG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB;;OAEG;IACH,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB;;OAEG;IACH,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB;;;OAGG;IACH,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;;OAGG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;;OAGG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;;;;;OAMG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;OAEG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC;CAC5B;AAED;;GAEG;AACH,MAAM,MAAM,kBAAkB,GAAG,OAAO,GAAG,OAAO,CAAC;AAEnD;;GAEG;AACH,MAAM,WAAW,gCAAgC;IAChD;;;OAGG;IACH,MAAM,CAAC,EAAE,qCAAqC,EAAE,CAAC;IACjD;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IACb,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC;CAC5B;AAED,MAAM,WAAW,qCAAqC;IACrD;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IACb;;OAEG;IACH,UAAU,EAAE,MAAM,EAAE,CAAC;IACrB,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC;CAC5B"}
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Inference code generated from the JSON schema spec in ./spec
3
+ *
4
+ * Using src/scripts/inference-codegen
5
+ */
6
+ export {};
@@ -0,0 +1,291 @@
1
+ /**
2
+ * Inference code generated from the JSON schema spec in ./spec
3
+ *
4
+ * Using src/scripts/inference-codegen
5
+ */
6
+ /**
7
+ * Chat Completion Input.
8
+ *
9
+ * Auto-generated from TGI specs.
10
+ * For more details, check out
11
+ * https://github.com/huggingface/huggingface.js/blob/main/packages/tasks/scripts/inference-tgi-import.ts.
12
+ */
13
+ export interface ChatCompletionInput {
14
+ /**
15
+ * Number between -2.0 and 2.0. Positive values penalize new tokens based on their existing
16
+ * frequency in the text so far,
17
+ * decreasing the model's likelihood to repeat the same line verbatim.
18
+ */
19
+ frequency_penalty?: number;
20
+ /**
21
+ * UNUSED
22
+ * Modify the likelihood of specified tokens appearing in the completion. Accepts a JSON
23
+ * object that maps tokens
24
+ * (specified by their token ID in the tokenizer) to an associated bias value from -100 to
25
+ * 100. Mathematically,
26
+ * the bias is added to the logits generated by the model prior to sampling. The exact
27
+ * effect will vary per model,
28
+ * but values between -1 and 1 should decrease or increase likelihood of selection; values
29
+ * like -100 or 100 should
30
+ * result in a ban or exclusive selection of the relevant token.
31
+ */
32
+ logit_bias?: number[];
33
+ /**
34
+ * Whether to return log probabilities of the output tokens or not. If true, returns the log
35
+ * probabilities of each
36
+ * output token returned in the content of message.
37
+ */
38
+ logprobs?: boolean;
39
+ /**
40
+ * The maximum number of tokens that can be generated in the chat completion.
41
+ */
42
+ max_tokens?: number;
43
+ /**
44
+ * A list of messages comprising the conversation so far.
45
+ */
46
+ messages: ChatCompletionInputMessage[];
47
+ /**
48
+ * [UNUSED] ID of the model to use. See the model endpoint compatibility table for details
49
+ * on which models work with the Chat API.
50
+ */
51
+ model?: string;
52
+ /**
53
+ * UNUSED
54
+ * How many chat completion choices to generate for each input message. Note that you will
55
+ * be charged based on the
56
+ * number of generated tokens across all of the choices. Keep n as 1 to minimize costs.
57
+ */
58
+ n?: number;
59
+ /**
60
+ * Number between -2.0 and 2.0. Positive values penalize new tokens based on whether they
61
+ * appear in the text so far,
62
+ * increasing the model's likelihood to talk about new topics
63
+ */
64
+ presence_penalty?: number;
65
+ response_format?: ChatCompletionInputGrammarType;
66
+ seed?: number;
67
+ /**
68
+ * Up to 4 sequences where the API will stop generating further tokens.
69
+ */
70
+ stop?: string[];
71
+ stream?: boolean;
72
+ stream_options?: ChatCompletionInputStreamOptions;
73
+ /**
74
+ * What sampling temperature to use, between 0 and 2. Higher values like 0.8 will make the
75
+ * output more random, while
76
+ * lower values like 0.2 will make it more focused and deterministic.
77
+ *
78
+ * We generally recommend altering this or `top_p` but not both.
79
+ */
80
+ temperature?: number;
81
+ tool_choice?: ChatCompletionInputTool;
82
+ /**
83
+ * A prompt to be appended before the tools
84
+ */
85
+ tool_prompt?: string;
86
+ /**
87
+ * A list of tools the model may call. Currently, only functions are supported as a tool.
88
+ * Use this to provide a list of
89
+ * functions the model may generate JSON inputs for.
90
+ */
91
+ tools?: ToolElement[];
92
+ /**
93
+ * An integer between 0 and 5 specifying the number of most likely tokens to return at each
94
+ * token position, each with
95
+ * an associated log probability. logprobs must be set to true if this parameter is used.
96
+ */
97
+ top_logprobs?: number;
98
+ /**
99
+ * An alternative to sampling with temperature, called nucleus sampling, where the model
100
+ * considers the results of the
101
+ * tokens with top_p probability mass. So 0.1 means only the tokens comprising the top 10%
102
+ * probability mass are considered.
103
+ */
104
+ top_p?: number;
105
+ [property: string]: unknown;
106
+ }
107
+ export interface ChatCompletionInputMessage {
108
+ content: ChatCompletionInputMessageContent;
109
+ name?: string;
110
+ role: string;
111
+ [property: string]: unknown;
112
+ }
113
+ export type ChatCompletionInputMessageContent = ChatCompletionInputMessageChunk[] | string;
114
+ export interface ChatCompletionInputMessageChunk {
115
+ image_url?: ChatCompletionInputURL;
116
+ text?: string;
117
+ type: ChatCompletionInputMessageChunkType;
118
+ [property: string]: unknown;
119
+ }
120
+ export interface ChatCompletionInputURL {
121
+ url: string;
122
+ [property: string]: unknown;
123
+ }
124
+ export type ChatCompletionInputMessageChunkType = "text" | "image_url";
125
+ export interface ChatCompletionInputGrammarType {
126
+ type: ChatCompletionInputGrammarTypeType;
127
+ /**
128
+ * A string that represents a [JSON Schema](https://json-schema.org/).
129
+ *
130
+ * JSON Schema is a declarative language that allows to annotate JSON documents
131
+ * with types and descriptions.
132
+ */
133
+ value: unknown;
134
+ [property: string]: unknown;
135
+ }
136
+ export type ChatCompletionInputGrammarTypeType = "json" | "regex";
137
+ export interface ChatCompletionInputStreamOptions {
138
+ /**
139
+ * If set, an additional chunk will be streamed before the data: [DONE] message. The usage
140
+ * field on this chunk shows the token usage statistics for the entire request, and the
141
+ * choices field will always be an empty array. All other chunks will also include a usage
142
+ * field, but with a null value.
143
+ */
144
+ include_usage: boolean;
145
+ [property: string]: unknown;
146
+ }
147
+ export type ChatCompletionInputTool = ChatCompletionInputToolType | string;
148
+ export interface ChatCompletionInputToolType {
149
+ function?: ChatCompletionInputFunctionName;
150
+ [property: string]: unknown;
151
+ }
152
+ export interface ChatCompletionInputFunctionName {
153
+ name: string;
154
+ [property: string]: unknown;
155
+ }
156
+ export interface ToolElement {
157
+ function: ChatCompletionInputFunctionDefinition;
158
+ type: string;
159
+ [property: string]: unknown;
160
+ }
161
+ export interface ChatCompletionInputFunctionDefinition {
162
+ arguments: unknown;
163
+ description?: string;
164
+ name: string;
165
+ [property: string]: unknown;
166
+ }
167
+ /**
168
+ * Chat Completion Output.
169
+ *
170
+ * Auto-generated from TGI specs.
171
+ * For more details, check out
172
+ * https://github.com/huggingface/huggingface.js/blob/main/packages/tasks/scripts/inference-tgi-import.ts.
173
+ */
174
+ export interface ChatCompletionOutput {
175
+ choices: ChatCompletionOutputComplete[];
176
+ created: number;
177
+ id: string;
178
+ model: string;
179
+ system_fingerprint: string;
180
+ usage: ChatCompletionOutputUsage;
181
+ [property: string]: unknown;
182
+ }
183
+ export interface ChatCompletionOutputComplete {
184
+ finish_reason: string;
185
+ index: number;
186
+ logprobs?: ChatCompletionOutputLogprobs;
187
+ message: ChatCompletionOutputMessage;
188
+ [property: string]: unknown;
189
+ }
190
+ export interface ChatCompletionOutputLogprobs {
191
+ content: ChatCompletionOutputLogprob[];
192
+ [property: string]: unknown;
193
+ }
194
+ export interface ChatCompletionOutputLogprob {
195
+ logprob: number;
196
+ token: string;
197
+ top_logprobs: ChatCompletionOutputTopLogprob[];
198
+ [property: string]: unknown;
199
+ }
200
+ export interface ChatCompletionOutputTopLogprob {
201
+ logprob: number;
202
+ token: string;
203
+ [property: string]: unknown;
204
+ }
205
+ export interface ChatCompletionOutputMessage {
206
+ content?: string;
207
+ role: string;
208
+ tool_calls?: ChatCompletionOutputToolCall[];
209
+ [property: string]: unknown;
210
+ }
211
+ export interface ChatCompletionOutputToolCall {
212
+ function: ChatCompletionOutputFunctionDefinition;
213
+ id: string;
214
+ type: string;
215
+ [property: string]: unknown;
216
+ }
217
+ export interface ChatCompletionOutputFunctionDefinition {
218
+ arguments: unknown;
219
+ description?: string;
220
+ name: string;
221
+ [property: string]: unknown;
222
+ }
223
+ export interface ChatCompletionOutputUsage {
224
+ completion_tokens: number;
225
+ prompt_tokens: number;
226
+ total_tokens: number;
227
+ [property: string]: unknown;
228
+ }
229
+ /**
230
+ * Chat Completion Stream Output.
231
+ *
232
+ * Auto-generated from TGI specs.
233
+ * For more details, check out
234
+ * https://github.com/huggingface/huggingface.js/blob/main/packages/tasks/scripts/inference-tgi-import.ts.
235
+ */
236
+ export interface ChatCompletionStreamOutput {
237
+ choices: ChatCompletionStreamOutputChoice[];
238
+ created: number;
239
+ id: string;
240
+ model: string;
241
+ system_fingerprint: string;
242
+ usage?: ChatCompletionStreamOutputUsage;
243
+ [property: string]: unknown;
244
+ }
245
+ export interface ChatCompletionStreamOutputChoice {
246
+ delta: ChatCompletionStreamOutputDelta;
247
+ finish_reason?: string;
248
+ index: number;
249
+ logprobs?: ChatCompletionStreamOutputLogprobs;
250
+ [property: string]: unknown;
251
+ }
252
+ export interface ChatCompletionStreamOutputDelta {
253
+ content?: string;
254
+ role: string;
255
+ tool_calls?: ChatCompletionStreamOutputDeltaToolCall;
256
+ [property: string]: unknown;
257
+ }
258
+ export interface ChatCompletionStreamOutputDeltaToolCall {
259
+ function: ChatCompletionStreamOutputFunction;
260
+ id: string;
261
+ index: number;
262
+ type: string;
263
+ [property: string]: unknown;
264
+ }
265
+ export interface ChatCompletionStreamOutputFunction {
266
+ arguments: string;
267
+ name?: string;
268
+ [property: string]: unknown;
269
+ }
270
+ export interface ChatCompletionStreamOutputLogprobs {
271
+ content: ChatCompletionStreamOutputLogprob[];
272
+ [property: string]: unknown;
273
+ }
274
+ export interface ChatCompletionStreamOutputLogprob {
275
+ logprob: number;
276
+ token: string;
277
+ top_logprobs: ChatCompletionStreamOutputTopLogprob[];
278
+ [property: string]: unknown;
279
+ }
280
+ export interface ChatCompletionStreamOutputTopLogprob {
281
+ logprob: number;
282
+ token: string;
283
+ [property: string]: unknown;
284
+ }
285
+ export interface ChatCompletionStreamOutputUsage {
286
+ completion_tokens: number;
287
+ prompt_tokens: number;
288
+ total_tokens: number;
289
+ [property: string]: unknown;
290
+ }
291
+ //# sourceMappingURL=inference.d.ts.map