@huggingface/tasks 0.1.3 → 0.2.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.d.ts CHANGED
@@ -42,7 +42,7 @@ declare enum ModelLibrary {
42
42
  "mindspore" = "MindSpore"
43
43
  }
44
44
  type ModelLibraryKey = keyof typeof ModelLibrary;
45
- declare const ALL_DISPLAY_MODEL_LIBRARY_KEYS: string[];
45
+ declare const ALL_DISPLAY_MODEL_LIBRARY_KEYS: ("speechbrain" | "fastai" | "adapter-transformers" | "allennlp" | "asteroid" | "bertopic" | "diffusers" | "doctr" | "espnet" | "fairseq" | "flair" | "keras" | "k2" | "mlx" | "nemo" | "open_clip" | "paddlenlp" | "peft" | "pyannote-audio" | "sample-factory" | "sentence-transformers" | "setfit" | "sklearn" | "spacy" | "span-marker" | "tensorflowtts" | "timm" | "transformers" | "transformers.js" | "stanza" | "fasttext" | "stable-baselines3" | "ml-agents" | "pythae" | "mindspore")[];
46
46
 
47
47
  declare const MODALITIES: readonly ["cv", "nlp", "audio", "tabular", "multimodal", "rl", "other"];
48
48
  type Modality = (typeof MODALITIES)[number];
@@ -742,11 +742,6 @@ interface TaskData {
742
742
  }
743
743
  type TaskDataCustom = Omit<TaskData, "id" | "label" | "libraries">;
744
744
 
745
- declare const TAG_NFAA_CONTENT = "not-for-all-audiences";
746
- declare const OTHER_TAGS_SUGGESTIONS: string[];
747
- declare const TAG_TEXT_GENERATION_INFERENCE = "text-generation-inference";
748
- declare const TAG_CUSTOM_CODE = "custom_code";
749
-
750
745
  declare function getModelInputSnippet(model: ModelData, noWrap?: boolean, noQuotes?: boolean): string;
751
746
 
752
747
  declare const inputs_getModelInputSnippet: typeof getModelInputSnippet;
@@ -854,4 +849,4 @@ declare namespace index {
854
849
  };
855
850
  }
856
851
 
857
- export { ALL_DISPLAY_MODEL_LIBRARY_KEYS, ExampleRepo, InferenceDisplayability, LIBRARY_TASK_MAPPING_EXCLUDING_TRANSFORMERS, LibraryUiElement, MAPPING_DEFAULT_WIDGET, MODALITIES, MODALITY_LABELS, MODEL_LIBRARIES_UI_ELEMENTS, Modality, ModelData, ModelLibrary, ModelLibraryKey, OTHER_TAGS_SUGGESTIONS, PIPELINE_DATA, PIPELINE_TYPES, PIPELINE_TYPES_SET, PipelineData, PipelineType, SUBTASK_TYPES, TAG_CUSTOM_CODE, TAG_NFAA_CONTENT, TAG_TEXT_GENERATION_INFERENCE, TASKS_DATA, TASKS_MODEL_LIBRARIES, TaskData, TaskDataCustom, TaskDemo, TaskDemoEntry, TransformersInfo, WidgetExample, WidgetExampleAssetAndPromptInput, WidgetExampleAssetAndTextInput, WidgetExampleAssetAndZeroShotInput, WidgetExampleAssetInput, WidgetExampleAttribute, WidgetExampleOutput, WidgetExampleOutputAnswerScore, WidgetExampleOutputLabels, WidgetExampleOutputText, WidgetExampleOutputUrl, WidgetExampleSentenceSimilarityInput, WidgetExampleStructuredDataInput, WidgetExampleTableDataInput, WidgetExampleTextAndContextInput, WidgetExampleTextAndTableInput, WidgetExampleTextInput, WidgetExampleZeroShotTextInput, index as snippets };
852
+ export { ALL_DISPLAY_MODEL_LIBRARY_KEYS, ExampleRepo, InferenceDisplayability, LIBRARY_TASK_MAPPING_EXCLUDING_TRANSFORMERS, LibraryUiElement, MAPPING_DEFAULT_WIDGET, MODALITIES, MODALITY_LABELS, MODEL_LIBRARIES_UI_ELEMENTS, Modality, ModelData, ModelLibrary, ModelLibraryKey, PIPELINE_DATA, PIPELINE_TYPES, PIPELINE_TYPES_SET, PipelineData, PipelineType, SUBTASK_TYPES, TASKS_DATA, TASKS_MODEL_LIBRARIES, TaskData, TaskDataCustom, TaskDemo, TaskDemoEntry, TransformersInfo, WidgetExample, WidgetExampleAssetAndPromptInput, WidgetExampleAssetAndTextInput, WidgetExampleAssetAndZeroShotInput, WidgetExampleAssetInput, WidgetExampleAttribute, WidgetExampleOutput, WidgetExampleOutputAnswerScore, WidgetExampleOutputLabels, WidgetExampleOutputText, WidgetExampleOutputUrl, WidgetExampleSentenceSimilarityInput, WidgetExampleStructuredDataInput, WidgetExampleTableDataInput, WidgetExampleTextAndContextInput, WidgetExampleTextAndTableInput, WidgetExampleTextInput, WidgetExampleZeroShotTextInput, index as snippets };
package/dist/index.js CHANGED
@@ -28,14 +28,10 @@ __export(src_exports, {
28
28
  MODALITY_LABELS: () => MODALITY_LABELS,
29
29
  MODEL_LIBRARIES_UI_ELEMENTS: () => MODEL_LIBRARIES_UI_ELEMENTS,
30
30
  ModelLibrary: () => ModelLibrary,
31
- OTHER_TAGS_SUGGESTIONS: () => OTHER_TAGS_SUGGESTIONS,
32
31
  PIPELINE_DATA: () => PIPELINE_DATA,
33
32
  PIPELINE_TYPES: () => PIPELINE_TYPES,
34
33
  PIPELINE_TYPES_SET: () => PIPELINE_TYPES_SET,
35
34
  SUBTASK_TYPES: () => SUBTASK_TYPES,
36
- TAG_CUSTOM_CODE: () => TAG_CUSTOM_CODE,
37
- TAG_NFAA_CONTENT: () => TAG_NFAA_CONTENT,
38
- TAG_TEXT_GENERATION_INFERENCE: () => TAG_TEXT_GENERATION_INFERENCE,
39
35
  TASKS_DATA: () => TASKS_DATA,
40
36
  TASKS_MODEL_LIBRARIES: () => TASKS_MODEL_LIBRARIES,
41
37
  snippets: () => snippets_exports
@@ -4627,7 +4623,8 @@ var ModelLibrary = /* @__PURE__ */ ((ModelLibrary2) => {
4627
4623
  ModelLibrary2["mindspore"] = "MindSpore";
4628
4624
  return ModelLibrary2;
4629
4625
  })(ModelLibrary || {});
4630
- var ALL_DISPLAY_MODEL_LIBRARY_KEYS = Object.keys(ModelLibrary).filter(
4626
+ var ALL_MODEL_LIBRARY_KEYS = Object.keys(ModelLibrary);
4627
+ var ALL_DISPLAY_MODEL_LIBRARY_KEYS = ALL_MODEL_LIBRARY_KEYS.filter(
4631
4628
  (k) => !["doctr", "k2", "mindspore", "tensorflowtts"].includes(k)
4632
4629
  );
4633
4630
 
@@ -4642,23 +4639,6 @@ var InferenceDisplayability = /* @__PURE__ */ ((InferenceDisplayability2) => {
4642
4639
  return InferenceDisplayability2;
4643
4640
  })(InferenceDisplayability || {});
4644
4641
 
4645
- // src/tags.ts
4646
- var TAG_NFAA_CONTENT = "not-for-all-audiences";
4647
- var OTHER_TAGS_SUGGESTIONS = [
4648
- "chemistry",
4649
- "biology",
4650
- "finance",
4651
- "legal",
4652
- "music",
4653
- "art",
4654
- "code",
4655
- "climate",
4656
- "medical",
4657
- TAG_NFAA_CONTENT
4658
- ];
4659
- var TAG_TEXT_GENERATION_INFERENCE = "text-generation-inference";
4660
- var TAG_CUSTOM_CODE = "custom_code";
4661
-
4662
4642
  // src/snippets/index.ts
4663
4643
  var snippets_exports = {};
4664
4644
  __export(snippets_exports, {
@@ -5130,14 +5110,10 @@ function hasJsInferenceSnippet(model) {
5130
5110
  MODALITY_LABELS,
5131
5111
  MODEL_LIBRARIES_UI_ELEMENTS,
5132
5112
  ModelLibrary,
5133
- OTHER_TAGS_SUGGESTIONS,
5134
5113
  PIPELINE_DATA,
5135
5114
  PIPELINE_TYPES,
5136
5115
  PIPELINE_TYPES_SET,
5137
5116
  SUBTASK_TYPES,
5138
- TAG_CUSTOM_CODE,
5139
- TAG_NFAA_CONTENT,
5140
- TAG_TEXT_GENERATION_INFERENCE,
5141
5117
  TASKS_DATA,
5142
5118
  TASKS_MODEL_LIBRARIES,
5143
5119
  snippets
package/dist/index.mjs CHANGED
@@ -4589,7 +4589,8 @@ var ModelLibrary = /* @__PURE__ */ ((ModelLibrary2) => {
4589
4589
  ModelLibrary2["mindspore"] = "MindSpore";
4590
4590
  return ModelLibrary2;
4591
4591
  })(ModelLibrary || {});
4592
- var ALL_DISPLAY_MODEL_LIBRARY_KEYS = Object.keys(ModelLibrary).filter(
4592
+ var ALL_MODEL_LIBRARY_KEYS = Object.keys(ModelLibrary);
4593
+ var ALL_DISPLAY_MODEL_LIBRARY_KEYS = ALL_MODEL_LIBRARY_KEYS.filter(
4593
4594
  (k) => !["doctr", "k2", "mindspore", "tensorflowtts"].includes(k)
4594
4595
  );
4595
4596
 
@@ -4604,23 +4605,6 @@ var InferenceDisplayability = /* @__PURE__ */ ((InferenceDisplayability2) => {
4604
4605
  return InferenceDisplayability2;
4605
4606
  })(InferenceDisplayability || {});
4606
4607
 
4607
- // src/tags.ts
4608
- var TAG_NFAA_CONTENT = "not-for-all-audiences";
4609
- var OTHER_TAGS_SUGGESTIONS = [
4610
- "chemistry",
4611
- "biology",
4612
- "finance",
4613
- "legal",
4614
- "music",
4615
- "art",
4616
- "code",
4617
- "climate",
4618
- "medical",
4619
- TAG_NFAA_CONTENT
4620
- ];
4621
- var TAG_TEXT_GENERATION_INFERENCE = "text-generation-inference";
4622
- var TAG_CUSTOM_CODE = "custom_code";
4623
-
4624
4608
  // src/snippets/index.ts
4625
4609
  var snippets_exports = {};
4626
4610
  __export(snippets_exports, {
@@ -5091,14 +5075,10 @@ export {
5091
5075
  MODALITY_LABELS,
5092
5076
  MODEL_LIBRARIES_UI_ELEMENTS,
5093
5077
  ModelLibrary,
5094
- OTHER_TAGS_SUGGESTIONS,
5095
5078
  PIPELINE_DATA,
5096
5079
  PIPELINE_TYPES,
5097
5080
  PIPELINE_TYPES_SET,
5098
5081
  SUBTASK_TYPES,
5099
- TAG_CUSTOM_CODE,
5100
- TAG_NFAA_CONTENT,
5101
- TAG_TEXT_GENERATION_INFERENCE,
5102
5082
  TASKS_DATA,
5103
5083
  TASKS_MODEL_LIBRARIES,
5104
5084
  snippets_exports as snippets
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.1.3",
4
+ "version": "0.2.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": {
package/src/index.ts CHANGED
@@ -39,8 +39,6 @@ export type {
39
39
  } from "./widget-example";
40
40
  export { InferenceDisplayability } from "./model-data";
41
41
 
42
- export { TAG_NFAA_CONTENT, OTHER_TAGS_SUGGESTIONS, TAG_TEXT_GENERATION_INFERENCE, TAG_CUSTOM_CODE } from "./tags";
43
-
44
42
  import * as snippets from "./snippets";
45
43
  export { snippets };
46
44
 
@@ -44,6 +44,8 @@ export enum ModelLibrary {
44
44
 
45
45
  export type ModelLibraryKey = keyof typeof ModelLibrary;
46
46
 
47
- export const ALL_DISPLAY_MODEL_LIBRARY_KEYS = Object.keys(ModelLibrary).filter(
47
+ export const ALL_MODEL_LIBRARY_KEYS = Object.keys(ModelLibrary) as ModelLibraryKey[];
48
+
49
+ export const ALL_DISPLAY_MODEL_LIBRARY_KEYS = ALL_MODEL_LIBRARY_KEYS.filter(
48
50
  (k) => !["doctr", "k2", "mindspore", "tensorflowtts"].includes(k)
49
51
  );
package/src/tags.ts DELETED
@@ -1,15 +0,0 @@
1
- export const TAG_NFAA_CONTENT = "not-for-all-audiences";
2
- export const OTHER_TAGS_SUGGESTIONS = [
3
- "chemistry",
4
- "biology",
5
- "finance",
6
- "legal",
7
- "music",
8
- "art",
9
- "code",
10
- "climate",
11
- "medical",
12
- TAG_NFAA_CONTENT,
13
- ];
14
- export const TAG_TEXT_GENERATION_INFERENCE = "text-generation-inference";
15
- export const TAG_CUSTOM_CODE = "custom_code";