@huggingface/tasks 0.5.1 → 0.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs CHANGED
@@ -4083,6 +4083,11 @@ var flair = (model) => [
4083
4083
 
4084
4084
  tagger = SequenceTagger.load("${model.id}")`
4085
4085
  ];
4086
+ var gliner = (model) => [
4087
+ `from model import GLiNER
4088
+
4089
+ model = GLiNER.from_pretrained("${model.id}")`
4090
+ ];
4086
4091
  var keras = (model) => [
4087
4092
  `from huggingface_hub import from_pretrained_keras
4088
4093
 
@@ -4578,6 +4583,16 @@ var MODEL_LIBRARIES_UI_ELEMENTS = {
4578
4583
  term: { path: "pytorch_model.bin" }
4579
4584
  }
4580
4585
  },
4586
+ gliner: {
4587
+ prettyLabel: "GLiNER",
4588
+ repoName: "GLiNER",
4589
+ repoUrl: "https://github.com/urchade/GLiNER",
4590
+ snippets: gliner,
4591
+ filter: false,
4592
+ countDownloads: {
4593
+ term: { path: "gliner_config.json" }
4594
+ }
4595
+ },
4581
4596
  keras: {
4582
4597
  prettyLabel: "Keras",
4583
4598
  repoName: "Keras",
@@ -4793,6 +4808,14 @@ var MODEL_LIBRARIES_UI_ELEMENTS = {
4793
4808
  countDownloads: {
4794
4809
  wildcard: { path: "*.sentis" }
4795
4810
  }
4811
+ },
4812
+ whisperkit: {
4813
+ prettyLabel: "WhisperKit",
4814
+ repoName: "WhisperKit",
4815
+ repoUrl: "https://github.com/argmaxinc/WhisperKit",
4816
+ countDownloads: {
4817
+ wildcard: { path: "*/model.mil" }
4818
+ }
4796
4819
  }
4797
4820
  };
4798
4821
  var ALL_MODEL_LIBRARY_KEYS = Object.keys(MODEL_LIBRARIES_UI_ELEMENTS);
package/dist/index.d.ts CHANGED
@@ -839,6 +839,18 @@ declare const MODEL_LIBRARIES_UI_ELEMENTS: {
839
839
  };
840
840
  };
841
841
  };
842
+ gliner: {
843
+ prettyLabel: string;
844
+ repoName: string;
845
+ repoUrl: string;
846
+ snippets: (model: ModelData) => string[];
847
+ filter: false;
848
+ countDownloads: {
849
+ term: {
850
+ path: string;
851
+ };
852
+ };
853
+ };
842
854
  keras: {
843
855
  prettyLabel: string;
844
856
  repoName: string;
@@ -1093,10 +1105,20 @@ declare const MODEL_LIBRARIES_UI_ELEMENTS: {
1093
1105
  };
1094
1106
  };
1095
1107
  };
1108
+ whisperkit: {
1109
+ prettyLabel: string;
1110
+ repoName: string;
1111
+ repoUrl: string;
1112
+ countDownloads: {
1113
+ wildcard: {
1114
+ path: string;
1115
+ };
1116
+ };
1117
+ };
1096
1118
  };
1097
1119
  type ModelLibraryKey = keyof typeof MODEL_LIBRARIES_UI_ELEMENTS;
1098
- declare const ALL_MODEL_LIBRARY_KEYS: ("sklearn" | "adapter-transformers" | "allennlp" | "asteroid" | "audiocraft" | "bertopic" | "diffusers" | "doctr" | "espnet" | "fairseq" | "fastai" | "fasttext" | "flair" | "keras" | "k2" | "mindspore" | "ml-agents" | "mlx" | "nemo" | "open_clip" | "paddlenlp" | "peft" | "pyannote-audio" | "pythae" | "sample-factory" | "sentence-transformers" | "setfit" | "spacy" | "span-marker" | "speechbrain" | "stable-baselines3" | "stanza" | "tensorflowtts" | "timm" | "transformers" | "transformers.js" | "unity-sentis")[];
1099
- declare const ALL_DISPLAY_MODEL_LIBRARY_KEYS: ("sklearn" | "adapter-transformers" | "allennlp" | "asteroid" | "audiocraft" | "bertopic" | "diffusers" | "doctr" | "espnet" | "fairseq" | "fastai" | "fasttext" | "flair" | "keras" | "k2" | "mindspore" | "ml-agents" | "mlx" | "nemo" | "open_clip" | "paddlenlp" | "peft" | "pyannote-audio" | "pythae" | "sample-factory" | "sentence-transformers" | "setfit" | "spacy" | "span-marker" | "speechbrain" | "stable-baselines3" | "stanza" | "tensorflowtts" | "timm" | "transformers" | "transformers.js" | "unity-sentis")[];
1120
+ declare const ALL_MODEL_LIBRARY_KEYS: ("sklearn" | "adapter-transformers" | "allennlp" | "asteroid" | "audiocraft" | "bertopic" | "diffusers" | "doctr" | "espnet" | "fairseq" | "fastai" | "fasttext" | "flair" | "gliner" | "keras" | "k2" | "mindspore" | "ml-agents" | "mlx" | "nemo" | "open_clip" | "paddlenlp" | "peft" | "pyannote-audio" | "pythae" | "sample-factory" | "sentence-transformers" | "setfit" | "spacy" | "span-marker" | "speechbrain" | "stable-baselines3" | "stanza" | "tensorflowtts" | "timm" | "transformers" | "transformers.js" | "unity-sentis" | "whisperkit")[];
1121
+ declare const ALL_DISPLAY_MODEL_LIBRARY_KEYS: ("sklearn" | "adapter-transformers" | "allennlp" | "asteroid" | "audiocraft" | "bertopic" | "diffusers" | "doctr" | "espnet" | "fairseq" | "fastai" | "fasttext" | "flair" | "gliner" | "keras" | "k2" | "mindspore" | "ml-agents" | "mlx" | "nemo" | "open_clip" | "paddlenlp" | "peft" | "pyannote-audio" | "pythae" | "sample-factory" | "sentence-transformers" | "setfit" | "spacy" | "span-marker" | "speechbrain" | "stable-baselines3" | "stanza" | "tensorflowtts" | "timm" | "transformers" | "transformers.js" | "unity-sentis" | "whisperkit")[];
1100
1122
 
1101
1123
  /**
1102
1124
  * Mapping from library name (excluding Transformers) to its supported tasks.
package/dist/index.js CHANGED
@@ -4048,6 +4048,11 @@ var flair = (model) => [
4048
4048
 
4049
4049
  tagger = SequenceTagger.load("${model.id}")`
4050
4050
  ];
4051
+ var gliner = (model) => [
4052
+ `from model import GLiNER
4053
+
4054
+ model = GLiNER.from_pretrained("${model.id}")`
4055
+ ];
4051
4056
  var keras = (model) => [
4052
4057
  `from huggingface_hub import from_pretrained_keras
4053
4058
 
@@ -4543,6 +4548,16 @@ var MODEL_LIBRARIES_UI_ELEMENTS = {
4543
4548
  term: { path: "pytorch_model.bin" }
4544
4549
  }
4545
4550
  },
4551
+ gliner: {
4552
+ prettyLabel: "GLiNER",
4553
+ repoName: "GLiNER",
4554
+ repoUrl: "https://github.com/urchade/GLiNER",
4555
+ snippets: gliner,
4556
+ filter: false,
4557
+ countDownloads: {
4558
+ term: { path: "gliner_config.json" }
4559
+ }
4560
+ },
4546
4561
  keras: {
4547
4562
  prettyLabel: "Keras",
4548
4563
  repoName: "Keras",
@@ -4758,6 +4773,14 @@ var MODEL_LIBRARIES_UI_ELEMENTS = {
4758
4773
  countDownloads: {
4759
4774
  wildcard: { path: "*.sentis" }
4760
4775
  }
4776
+ },
4777
+ whisperkit: {
4778
+ prettyLabel: "WhisperKit",
4779
+ repoName: "WhisperKit",
4780
+ repoUrl: "https://github.com/argmaxinc/WhisperKit",
4781
+ countDownloads: {
4782
+ wildcard: { path: "*/model.mil" }
4783
+ }
4761
4784
  }
4762
4785
  };
4763
4786
  var ALL_MODEL_LIBRARY_KEYS = Object.keys(MODEL_LIBRARIES_UI_ELEMENTS);
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@huggingface/tasks",
3
3
  "packageManager": "pnpm@8.10.5",
4
- "version": "0.5.1",
4
+ "version": "0.6.0",
5
5
  "description": "List of ML tasks for huggingface.co/tasks",
6
6
  "repository": "https://github.com/huggingface/huggingface.js.git",
7
7
  "publishConfig": {
@@ -140,6 +140,12 @@ export const flair = (model: ModelData): string[] => [
140
140
  tagger = SequenceTagger.load("${model.id}")`,
141
141
  ];
142
142
 
143
+ export const gliner = (model: ModelData): string[] => [
144
+ `from model import GLiNER
145
+
146
+ model = GLiNER.from_pretrained("${model.id}")`,
147
+ ];
148
+
143
149
  export const keras = (model: ModelData): string[] => [
144
150
  `from huggingface_hub import from_pretrained_keras
145
151
 
@@ -157,6 +157,16 @@ export const MODEL_LIBRARIES_UI_ELEMENTS = {
157
157
  term: { path: "pytorch_model.bin" },
158
158
  },
159
159
  },
160
+ gliner: {
161
+ prettyLabel: "GLiNER",
162
+ repoName: "GLiNER",
163
+ repoUrl: "https://github.com/urchade/GLiNER",
164
+ snippets: snippets.gliner,
165
+ filter: false,
166
+ countDownloads: {
167
+ term: { path: "gliner_config.json" },
168
+ },
169
+ },
160
170
  keras: {
161
171
  prettyLabel: "Keras",
162
172
  repoName: "Keras",
@@ -373,6 +383,14 @@ export const MODEL_LIBRARIES_UI_ELEMENTS = {
373
383
  wildcard: { path: "*.sentis" },
374
384
  },
375
385
  },
386
+ whisperkit: {
387
+ prettyLabel: "WhisperKit",
388
+ repoName: "WhisperKit",
389
+ repoUrl: "https://github.com/argmaxinc/WhisperKit",
390
+ countDownloads: {
391
+ wildcard: { path: "*/model.mil" },
392
+ },
393
+ },
376
394
  } satisfies Record<string, LibraryUiElement>;
377
395
 
378
396
  export type ModelLibraryKey = keyof typeof MODEL_LIBRARIES_UI_ELEMENTS;