@huggingface/tasks 0.21.54 → 0.21.55

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.
@@ -1,5 +1,5 @@
1
1
  import { describe, expect, it } from "vitest";
2
- import { adapters, diffusers, keras_hub, llama_cpp_python, multimolecule, paddlenlp, peft, sklearn, transformers, } from "./model-libraries-snippets.js";
2
+ import { adapters, cartesia_pytorch, depth_anything_v2, describe_anything, diffusers, diffusionkit, gliner2, indextts, keras_hub, kernels, kimi_audio, litert_lm, llama_cpp_python, microduck, mlAgents, mlxim, multimolecule, paddlenlp, peft, phantom_wan, pruna, sam2, sam_3d_body, sentenceTransformers, sklearn, speechbrain, timm, transformers, transformersJS, ultralytics, vui, } from "./model-libraries-snippets.js";
3
3
  describe("model-libraries-snippets", () => {
4
4
  it("llama_cpp_python conversational", async () => {
5
5
  const model = {
@@ -50,6 +50,25 @@ output = llm(
50
50
  )
51
51
  print(output)`);
52
52
  });
53
+ describe("microduck", () => {
54
+ it("uses an explicit slot tag even when the repo name and other tags suggest walking", () => {
55
+ const model = {
56
+ id: "user/microduck-walk",
57
+ tags: ["microduck", "walk", "microduck-slot:stand", "microduck-slot:stand"],
58
+ inference: "",
59
+ };
60
+ expect(microduck(model)).toEqual(["sudo robotctl policy load stand user/microduck-walk"]);
61
+ });
62
+ it.each([
63
+ { scenario: "missing slot tags", tags: ["microduck", "walk"] },
64
+ { scenario: "unsupported slot tags", tags: ["microduck-slot:bow"] },
65
+ { scenario: "conflicting slot tags", tags: ["microduck-slot:walk", "microduck-slot:stand"] },
66
+ ])("requires a slot choice for $scenario", ({ tags }) => {
67
+ const snippet = microduck({ id: "user/microduck-walk", tags, inference: "" }).join("\n");
68
+ expect(snippet).toContain("# Replace SLOT with the slot specified in the model card");
69
+ expect(snippet).toContain("sudo robotctl policy load SLOT user/microduck-walk");
70
+ });
71
+ });
53
72
  // a repo owner can put anything in config.json / the model card, so every interpolated value
54
73
  // must either be escaped (string literals) or rejected (bare identifiers)
55
74
  describe("repo-controlled values are not injectable", () => {
@@ -58,6 +77,7 @@ print(output)`);
58
77
  ["adapters", adapters, { config: { adapter_transformers: { model_name: PAYLOAD } } }],
59
78
  ["diffusers", diffusers, { tags: ["lora"], cardData: { base_model: PAYLOAD, instance_prompt: PAYLOAD } }],
60
79
  ["keras_hub", keras_hub, { config: { keras_hub: { tasks: [PAYLOAD, "TextClassifier"] } } }],
80
+ ["microduck", microduck, { tags: [`microduck-slot:${PAYLOAD}`] }],
61
81
  ["paddlenlp", paddlenlp, { config: { architectures: [PAYLOAD] } }],
62
82
  ["peft", peft, { config: { peft: { base_model_name_or_path: PAYLOAD, task_type: "CAUSAL_LM" } } }],
63
83
  ["multimolecule", multimolecule, { widgetData: [{ text: PAYLOAD }] }],
@@ -81,4 +101,284 @@ print(output)`);
81
101
  expect(keras_hub(model).join("\n")).toContain("keras_hub.models.TextClassifier.from_preset");
82
102
  });
83
103
  });
104
+ describe("snippets stay runnable for the common repo shapes", () => {
105
+ const base = { id: "user/model", tags: [], inference: "" };
106
+ it("transformers: the chat example needs a chat template, not only the conversational tag", () => {
107
+ const chatModel = {
108
+ ...base,
109
+ pipeline_tag: "text-generation",
110
+ tags: ["conversational"],
111
+ transformersInfo: { auto_model: "AutoModelForCausalLM", processor: "AutoTokenizer" },
112
+ };
113
+ const [pipelineWithoutTemplate] = transformers(chatModel);
114
+ expect(pipelineWithoutTemplate).not.toContain("messages");
115
+ const [pipelineSnippet, autoSnippet] = transformers({
116
+ ...chatModel,
117
+ config: { tokenizer_config: { chat_template: "{{ messages }}" } },
118
+ });
119
+ expect(pipelineSnippet).toContain("pipe(messages)");
120
+ expect(autoSnippet).toContain("max_new_tokens=256");
121
+ expect(autoSnippet).toContain("# pip install -U transformers accelerate");
122
+ });
123
+ it("transformers: pipelines removed in v5 get a warning with a valid pip command", () => {
124
+ const [snippet] = transformers({
125
+ ...base,
126
+ pipeline_tag: "question-answering",
127
+ transformersInfo: { auto_model: "AutoModelForQuestionAnswering", processor: "AutoTokenizer" },
128
+ });
129
+ expect(snippet).toContain("no longer supported in transformers v5");
130
+ expect(snippet).toContain(`# pip install "transformers<5.0.0"`);
131
+ });
132
+ it("sentence-transformers: rerankers tagged text-classification use CrossEncoder", () => {
133
+ const [reranker] = sentenceTransformers({
134
+ ...base,
135
+ pipeline_tag: "text-classification",
136
+ config: { architectures: ["XLMRobertaForSequenceClassification"] },
137
+ });
138
+ expect(reranker).toContain("CrossEncoder(");
139
+ const [biEncoder] = sentenceTransformers({
140
+ ...base,
141
+ pipeline_tag: "sentence-similarity",
142
+ config: { architectures: ["BertModel"] },
143
+ });
144
+ expect(biEncoder).toContain("SentenceTransformer(");
145
+ // SetFit bi-encoders can carry a *ForSequenceClassification config too (e.g. NW-temp/previous-best-my-awesome-setfit-model)
146
+ const [setfitModel] = sentenceTransformers({
147
+ ...base,
148
+ tags: ["setfit"],
149
+ pipeline_tag: "text-classification",
150
+ config: { architectures: ["DistilBertForSequenceClassification"] },
151
+ });
152
+ expect(setfitModel).not.toContain("CrossEncoder(");
153
+ });
154
+ it("sentence-transformers: sparse encoders use SparseEncoder", () => {
155
+ const [snippet] = sentenceTransformers({ ...base, tags: ["sparse-encoder"] });
156
+ expect(snippet).toContain("SparseEncoder(");
157
+ expect(snippet).toContain("encode_query(");
158
+ });
159
+ it("sentence-transformers: multi-vector encoders use MultiVectorEncoder", () => {
160
+ // e.g. answerdotai/answerai-colbert-small-v1, tagged multi-vector by the library on push
161
+ const [snippet] = sentenceTransformers({ ...base, tags: ["multi-vector"] });
162
+ expect(snippet).toContain(`MultiVectorEncoder("user/model")`);
163
+ expect(snippet).toContain("encode_document(");
164
+ });
165
+ it("diffusers: prefixed pipeline class tags reach the dedicated branches", () => {
166
+ const inpainting = diffusers({ ...base, tags: ["diffusers:StableDiffusionInpaintPipeline"] });
167
+ expect(inpainting.join("\n")).toContain("AutoPipelineForInpainting");
168
+ // several inpainting repos only ship non-variant weights
169
+ expect(inpainting.join("\n")).not.toContain('variant="fp16"');
170
+ const fluxFill = diffusers({ ...base, config: { diffusers: { _class_name: "FluxFillPipeline" } } });
171
+ expect(fluxFill.join("\n")).toContain("FluxFillPipeline");
172
+ });
173
+ it("diffusers: the first base model is used when several are listed", () => {
174
+ const snippet = diffusers({
175
+ ...base,
176
+ tags: ["lora"],
177
+ cardData: { base_model: ["org/base", "org/base-turbo"] },
178
+ }).join("\n");
179
+ expect(snippet).toContain(`"org/base"`);
180
+ expect(snippet).not.toContain("org/base,org/base-turbo");
181
+ });
182
+ it("diffusers: a listed Diffusers conversion is preferred over the original checkpoint", () => {
183
+ // e.g. Remade-AI/Rotate: only the -Diffusers repo has a model_index.json
184
+ const snippet = diffusers({
185
+ ...base,
186
+ tags: ["lora"],
187
+ pipeline_tag: "image-to-video",
188
+ cardData: { base_model: ["Wan-AI/Wan2.1-I2V-14B-480P", "Wan-AI/Wan2.1-I2V-14B-480P-Diffusers"] },
189
+ }).join("\n");
190
+ expect(snippet).toContain(`DiffusionPipeline.from_pretrained("Wan-AI/Wan2.1-I2V-14B-480P-Diffusers"`);
191
+ });
192
+ it("diffusers: LoRA image-to-video exports the generated frames", () => {
193
+ const snippet = diffusers({
194
+ ...base,
195
+ tags: ["lora"],
196
+ pipeline_tag: "image-to-video",
197
+ cardData: { base_model: "org/base" },
198
+ }).join("\n");
199
+ expect(snippet).toContain("output = pipe(");
200
+ expect(snippet).toContain(`export_to_video(output, "output.mp4")`);
201
+ });
202
+ it("transformers.js: Hub tasks without a pipeline() task of the same name are mapped", () => {
203
+ expect(transformersJS({ ...base, pipeline_tag: "sentence-similarity" })[0]).toContain("pipeline('feature-extraction'");
204
+ expect(transformersJS({ ...base, pipeline_tag: "fill-mask" })[0]).toContain("pipeline('fill-mask'");
205
+ });
206
+ it("transformers.js: rerankers score query/document pairs instead of using the text-classification pipeline", () => {
207
+ // the text-classification pipeline takes no text pairs and softmaxes a single logit, so every score is 1
208
+ const [snippet] = transformersJS({ ...base, pipeline_tag: "text-ranking" });
209
+ expect(snippet).not.toContain("pipeline(");
210
+ expect(snippet).toContain("AutoModelForSequenceClassification.from_pretrained('user/model')");
211
+ expect(snippet).toContain("text_pair: documents");
212
+ expect(snippet).toContain("logits.sigmoid()");
213
+ });
214
+ it("peft: every PEFT task type has a loader", () => {
215
+ const adapter = (task_type) => ({ ...base, config: { peft: { base_model_name_or_path: "org/base", task_type } } });
216
+ expect(peft(adapter("FEATURE_EXTRACTION"))[0]).toContain("AutoModel.from_pretrained");
217
+ expect(peft(adapter("QUESTION_ANS"))[0]).toContain("AutoModelForQuestionAnswering");
218
+ expect(peft(adapter("CAUSAL_LM"))[0]).toContain("AutoModelForCausalLM");
219
+ expect(peft(adapter("UNKNOWN"))[0]).toEqual("Task type is invalid.");
220
+ });
221
+ it("peft: speech seq2seq adapters use the speech auto class", () => {
222
+ const whisper = peft({
223
+ ...base,
224
+ config: { peft: { base_model_name_or_path: "openai/whisper-large-v3", task_type: "SEQ_2_SEQ_LM" } },
225
+ })[0];
226
+ expect(whisper).toContain("AutoModelForSpeechSeq2Seq");
227
+ for (const baseId of [
228
+ "facebook/s2t-small-librispeech-asr",
229
+ "facebook/seamless-m4t-v2-large",
230
+ "microsoft/speecht5_asr",
231
+ ]) {
232
+ expect(peft({
233
+ ...base,
234
+ config: { peft: { base_model_name_or_path: baseId, task_type: "SEQ_2_SEQ_LM" } },
235
+ })[0]).toContain("AutoModelForSpeechSeq2Seq");
236
+ }
237
+ const t5 = peft({
238
+ ...base,
239
+ config: { peft: { base_model_name_or_path: "google/flan-t5-base", task_type: "SEQ_2_SEQ_LM" } },
240
+ })[0];
241
+ expect(t5).toContain("AutoModelForSeq2SeqLM");
242
+ // audio models that transformers registers under the text seq2seq class must not be overridden
243
+ const qwenAudio = peft({
244
+ ...base,
245
+ pipeline_tag: "automatic-speech-recognition",
246
+ config: { peft: { base_model_name_or_path: "Qwen/Qwen2-Audio-7B", task_type: "SEQ_2_SEQ_LM" } },
247
+ })[0];
248
+ expect(qwenAudio).toContain("AutoModelForSeq2SeqLM");
249
+ });
250
+ it("peft: multi-task speech bases only get the speech class for speech-to-text adapters", () => {
251
+ const adapter = (baseId, extra = {}) => peft({
252
+ ...base,
253
+ ...extra,
254
+ config: { peft: { base_model_name_or_path: baseId, task_type: "SEQ_2_SEQ_LM" } },
255
+ })[0];
256
+ // SeamlessM4T text translation adapters need the text-to-text head (e.g. maxbsdv/LEO-SeamlessM4T-v2-Large-Roverplastik)
257
+ expect(adapter("facebook/seamless-m4t-v2-large", { pipeline_tag: "translation" })).toContain("AutoModelForSeq2SeqLM");
258
+ expect(adapter("facebook/seamless-m4t-v2-large", { tags: ["translation"] })).toContain("AutoModelForSeq2SeqLM");
259
+ // speech adapters, tagged or not, keep the speech-to-text head
260
+ expect(adapter("facebook/seamless-m4t-v2-large", { tags: ["speech-translation"] })).toContain("AutoModelForSpeechSeq2Seq");
261
+ // SpeechT5 text-to-speech bases load the text-to-spectrogram head, not the speech-to-text one
262
+ // e.g. Solo448/SpeechT5-Unified-TTS-PEFT; PEFT's seq2seq wrapper cannot wrap it, so the task type is dropped
263
+ const tts = adapter("microsoft/speecht5_tts");
264
+ expect(tts).toContain(`AutoModelForTextToSpectrogram.from_pretrained("microsoft/speecht5_tts")`);
265
+ expect(tts).toContain("config.task_type = None");
266
+ expect(adapter("user/speecht5_finetuned_voxpopuli_nl")).toContain("AutoModelForTextToSpectrogram");
267
+ expect(adapter("user/speecht5_tts_basrah_dialect")).not.toContain("AutoModelForSpeechSeq2Seq");
268
+ expect(adapter("user/speecht5_finetuned_librispeech", { pipeline_tag: "automatic-speech-recognition" })).toContain("AutoModelForSpeechSeq2Seq");
269
+ // the ASR task can also come from the tags alone
270
+ expect(adapter("user/speecht5_finetuned_librispeech", { tags: ["automatic-speech-recognition"] })).toContain("AutoModelForSpeechSeq2Seq");
271
+ });
272
+ it("peft: falls back to the model card's base model", () => {
273
+ const snippet = peft({
274
+ ...base,
275
+ cardData: { base_model: "org/base" },
276
+ config: { peft: { task_type: "CAUSAL_LM" } },
277
+ })[0];
278
+ expect(snippet).toContain(`"org/base"`);
279
+ });
280
+ it("ultralytics: mainline loads weights with YOLO(), the yolov10 fork keeps its own loader", () => {
281
+ expect(ultralytics(base)[0]).toContain("model = YOLO(weights)");
282
+ expect(ultralytics({ ...base, tags: ["yolov10", "safetensors"] })[0]).toContain("YOLOv10.from_pretrained");
283
+ expect(ultralytics({ ...base, library_name: "yolov10", tags: ["yolov10", "safetensors"] })[0]).toContain("YOLOv10.from_pretrained");
284
+ });
285
+ it("ultralytics: yolov10 fork repos that only ship .pt weights load them with YOLOv10()", () => {
286
+ // e.g. kadirnar/Yolov10: from_pretrained needs the config.json and model.safetensors of a fork push
287
+ const [snippet] = ultralytics({ ...base, library_name: "yolov10", tags: ["yolov10"] });
288
+ expect(snippet).toContain("model = YOLOv10(weights)");
289
+ expect(snippet).not.toContain("from_pretrained");
290
+ });
291
+ it("ultralytics: mainline repos listing a yolov10 tag stay on the mainline loader", () => {
292
+ // e.g. Ultralytics/YOLOv8 is tagged yolov3 ... yolov10 but only ships .pt files for mainline YOLO()
293
+ const versionTags = ["ultralytics", "yolov8", "yolov9", "yolov10"];
294
+ for (const model of [
295
+ { ...base, library_name: "ultralytics", tags: versionTags },
296
+ { ...base, tags: versionTags },
297
+ ]) {
298
+ const [snippet] = ultralytics(model);
299
+ expect(snippet).toContain("model = YOLO(weights)");
300
+ expect(snippet).not.toContain("YOLOv10");
301
+ }
302
+ });
303
+ it("ultralytics: fork pushes tagged ultralytics keep the yolov10 loader", () => {
304
+ // e.g. kairess/baby-face-detection-yolov10: library ultralytics, but only the fork's model.safetensors
305
+ const [snippet] = ultralytics({
306
+ ...base,
307
+ library_name: "ultralytics",
308
+ tags: ["ultralytics", "safetensors", "yolov10"],
309
+ });
310
+ expect(snippet).toContain("YOLOv10.from_pretrained");
311
+ });
312
+ it("pruna: the pro variant never rewrites the repo id", () => {
313
+ const snippet = pruna({ ...base, id: "pruna-test/model", tags: ["pruna_pro-ai"] }).join("\n");
314
+ expect(snippet).toContain("from pruna_pro import PrunaProModel");
315
+ expect(snippet).toContain(`"pruna-test/model"`);
316
+ expect(snippet).not.toContain("pruna_pro-test");
317
+ });
318
+ it("sklearn: joblib repos use the filename declared in config.json", () => {
319
+ expect(sklearn({ ...base, config: { sklearn: { model: { file: "model.pkl" } } } })[0]).toContain(`"model.pkl"`);
320
+ expect(sklearn(base)[0]).toContain(`"sklearn_model.joblib"`);
321
+ // a declared name that is not a pickle (typo'd in e.g. danupurnomo/dummy-titanic) falls back to the default
322
+ expect(sklearn({ ...base, config: { sklearn: { model: { file: "sklean_model.jpblib" } } } })[0]).toContain(`"sklearn_model.joblib"`);
323
+ });
324
+ it("sklearn: skops repos download with huggingface_hub", () => {
325
+ // skops.hub_utils was removed in skops 0.12
326
+ const skops = (sklearnConfig) => sklearn({ ...base, tags: ["skops"], config: { sklearn: sklearnConfig } })[0];
327
+ const skopsFile = skops({ model: { file: "model.skops" }, model_format: "skops" });
328
+ expect(skopsFile).toContain(`model = load(hf_hub_download("user/model", "model.skops"))`);
329
+ expect(skopsFile).not.toContain("hub_utils");
330
+ const pickled = skops({ model: { file: "model.pkl" }, model_format: "pickle" });
331
+ expect(pickled).toContain(`joblib.load(\n\thf_hub_download("user/model", "model.pkl")`);
332
+ expect(pickled).not.toContain("hub_utils");
333
+ // a pickled file without a declared model_format (e.g. julien-c/skops-digits) is not read with skops.io
334
+ const undeclared = skops({ model: { file: "sklearn_model.joblib" } });
335
+ expect(undeclared).toContain("joblib.load(");
336
+ expect(undeclared).not.toContain("skops.io");
337
+ });
338
+ it("speechbrain: speaker verification compares two recordings", () => {
339
+ const [snippet] = speechbrain({
340
+ ...base,
341
+ config: { speechbrain: { speechbrain_interface: "SpeakerRecognition" } },
342
+ });
343
+ expect(snippet).toContain(`verify_files("speaker1.wav", "speaker2.wav")`);
344
+ });
345
+ it("repo ids are quoted in generated Python", () => {
346
+ const model = { ...base, id: "org/some-model" };
347
+ for (const snippetFn of [sam2, sam_3d_body, mlxim, indextts, describe_anything, diffusionkit, phantom_wan]) {
348
+ for (const snippet of snippetFn(model)) {
349
+ expect(snippet).not.toMatch(/[(=,]\s*org\/some-model/);
350
+ }
351
+ }
352
+ });
353
+ it("mlx-image: create_model receives the registry name, not the repo id", () => {
354
+ const [snippet] = mlxim({ ...base, id: "mlx-vision/vit_small_patch16_224.dinov3-mlxim" });
355
+ expect(snippet).toContain(`create_model("vit_small_patch16_224.dinov3")`);
356
+ });
357
+ it("litert-lm: the command runs as pasted, without a placeholder file argument", () => {
358
+ // litert-lm picks the repo's .litertlm file itself; an unedited `<file>` would be read by the shell as a redirection
359
+ const [snippet] = litert_lm(base);
360
+ expect(snippet).toContain("--from-huggingface-repo=user/model \\\n");
361
+ expect(snippet.slice(snippet.indexOf("litert-lm run"))).not.toMatch(/[<>]/);
362
+ });
363
+ it("static templates no longer carry typos", () => {
364
+ expect(mlAgents(base)[0]).toContain(`--local-dir="./downloads"`);
365
+ expect(timm(base)[0]).toContain(`"hf-hub:user/model"`);
366
+ expect(kernels(base)[0]).toContain(`get_kernel("user/model", version=1)`);
367
+ expect(gliner2(base)[0]).toContain("extractor = AutoExtractor.from_pretrained");
368
+ expect(cartesia_pytorch(base)[0].trimEnd()).toMatch(/print\(out_message\)$/);
369
+ expect(vui()[0]).toContain("from vui.legacy import Vui, render\n");
370
+ expect(phantom_wan(base)[0]).toContain('Image.open("path/to/image.jpg")');
371
+ });
372
+ it("templates run as pasted", () => {
373
+ expect(sam2(base)[1]).toContain("predictor.add_new_points(state, <your_prompts>)\n");
374
+ expect(depth_anything_v2(base)[0]).toContain("model.load_state_dict(state_dict)\nmodel.eval()");
375
+ const [sam3dBody] = sam_3d_body(base);
376
+ expect(sam3dBody).toContain("from tools.vis_utils import visualize_sample_together");
377
+ expect(sam3dBody).toContain('img_bgr = cv2.imread("path/to/image.jpg")');
378
+ expect(kimi_audio(base)[0]).toContain(`"transformers<5"`);
379
+ const [cartesia] = cartesia_pytorch(base);
380
+ expect(cartesia).toContain("from cartesia_pytorch.Rene import ReneLMHeadModel");
381
+ expect(cartesia).toContain(`.from_pretrained("user/model").half().cuda()`);
382
+ });
383
+ });
84
384
  });
@@ -314,7 +314,7 @@ export declare const MODEL_LIBRARIES_UI_ELEMENTS: {
314
314
  prettyLabel: string;
315
315
  repoName: string;
316
316
  repoUrl: string;
317
- snippets: (model: ModelData) => string[];
317
+ snippets: () => string[];
318
318
  filter: false;
319
319
  countDownloads: string;
320
320
  };
@@ -1027,6 +1027,7 @@ export declare const MODEL_LIBRARIES_UI_ELEMENTS: {
1027
1027
  prettyLabel: string;
1028
1028
  repoName: string;
1029
1029
  repoUrl: string;
1030
+ snippets: (model: ModelData) => string[];
1030
1031
  filter: true;
1031
1032
  countDownloads: string;
1032
1033
  };
@@ -1 +1 @@
1
- {"version":3,"file":"model-libraries.d.ts","sourceRoot":"","sources":["../../src/model-libraries.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AACjD,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,gCAAgC,CAAC;AAEzE;;GAEG;AACH,MAAM,WAAW,gBAAgB;IAChC;;;;OAIG;IACH,WAAW,EAAE,MAAM,CAAC;IACpB;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAC;IACjB;;OAEG;IACH,OAAO,EAAE,MAAM,CAAC;IAChB;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB;;OAEG;IACH,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,SAAS,KAAK,MAAM,EAAE,CAAC;IAC1C;;;;;OAKG;IACH,cAAc,CAAC,EAAE,kBAAkB,CAAC;IACpC;;;OAGG;IACH,MAAM,CAAC,EAAE,OAAO,CAAC;CACjB;AAED;;;;;;;;;;;;;GAaG;AAEH,eAAO,MAAM,2BAA2B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAm1DI,CAAC;AAE7C,MAAM,MAAM,eAAe,GAAG,MAAM,OAAO,2BAA2B,CAAC;AAEvE,eAAO,MAAM,sBAAsB,EAA+C,eAAe,EAAE,CAAC;AAEpG,eAAO,MAAM,8BAA8B,yiHAQ1B,CAAC"}
@@ -988,7 +988,8 @@ export const MODEL_LIBRARIES_UI_ELEMENTS = {
988
988
  microduck: {
989
989
  prettyLabel: "Microduck",
990
990
  repoName: "Microduck",
991
- repoUrl: "https://github.com/pollen-robotics/microduck_rl",
991
+ repoUrl: "https://github.com/pollen-robotics/microduck",
992
+ snippets: snippets.microduck,
992
993
  filter: true,
993
994
  countDownloads: `path_extension:"onnx"`,
994
995
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@huggingface/tasks",
3
- "version": "0.21.54",
3
+ "version": "0.21.55",
4
4
  "description": "List of ML tasks for huggingface.co/tasks",
5
5
  "keywords": [
6
6
  "hub",
@@ -72,4 +72,11 @@ export const LIBRARY_TASK_MAPPING: Partial<Record<ModelLibraryKey, PipelineType[
72
72
  };
73
73
 
74
74
  // Pipeline types that were supported in legacy transformers versions (<5.0.0)
75
- export const REMOVED_IN_V5_TRANSFORMERS_PIPELINES: PipelineType[] = ["image-to-text", "summarization", "translation"];
75
+ export const REMOVED_IN_V5_TRANSFORMERS_PIPELINES: PipelineType[] = [
76
+ "image-to-image",
77
+ "image-to-text",
78
+ "question-answering",
79
+ "summarization",
80
+ "translation",
81
+ "visual-question-answering",
82
+ ];