@huggingface/tasks 0.0.4 → 0.0.5
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 +11 -1
- package/dist/index.js +14 -0
- package/dist/index.mjs +12 -0
- package/package.json +4 -4
- package/src/image-to-image/about.md +2 -2
- package/src/index.ts +10 -1
- package/src/pipelines.ts +11 -0
package/dist/index.d.ts
CHANGED
|
@@ -43,6 +43,15 @@ type ModelLibraryKey = keyof typeof ModelLibrary;
|
|
|
43
43
|
|
|
44
44
|
declare const MODALITIES: readonly ["cv", "nlp", "audio", "tabular", "multimodal", "rl", "other"];
|
|
45
45
|
type Modality = (typeof MODALITIES)[number];
|
|
46
|
+
declare const MODALITY_LABELS: {
|
|
47
|
+
multimodal: string;
|
|
48
|
+
nlp: string;
|
|
49
|
+
audio: string;
|
|
50
|
+
cv: string;
|
|
51
|
+
rl: string;
|
|
52
|
+
tabular: string;
|
|
53
|
+
other: string;
|
|
54
|
+
};
|
|
46
55
|
/**
|
|
47
56
|
* Public interface for a sub task.
|
|
48
57
|
*
|
|
@@ -400,6 +409,7 @@ declare const PIPELINE_DATA: {
|
|
|
400
409
|
};
|
|
401
410
|
};
|
|
402
411
|
type PipelineType = keyof typeof PIPELINE_DATA;
|
|
412
|
+
declare const PIPELINE_TYPES: ("other" | "text-classification" | "token-classification" | "table-question-answering" | "question-answering" | "zero-shot-classification" | "translation" | "summarization" | "conversational" | "feature-extraction" | "text-generation" | "text2text-generation" | "fill-mask" | "sentence-similarity" | "text-to-speech" | "text-to-audio" | "automatic-speech-recognition" | "audio-to-audio" | "audio-classification" | "voice-activity-detection" | "depth-estimation" | "image-classification" | "object-detection" | "image-segmentation" | "text-to-image" | "image-to-text" | "image-to-image" | "unconditional-image-generation" | "video-classification" | "reinforcement-learning" | "robotics" | "tabular-classification" | "tabular-regression" | "tabular-to-text" | "table-to-text" | "multiple-choice" | "text-retrieval" | "time-series-forecasting" | "text-to-video" | "visual-question-answering" | "document-question-answering" | "zero-shot-image-classification" | "graph-ml")[];
|
|
403
413
|
|
|
404
414
|
interface ExampleRepo {
|
|
405
415
|
description: string;
|
|
@@ -454,4 +464,4 @@ interface TaskData {
|
|
|
454
464
|
|
|
455
465
|
declare const TASKS_DATA: Record<PipelineType, TaskData | undefined>;
|
|
456
466
|
|
|
457
|
-
export { ExampleRepo, MODALITIES, Modality, ModelLibrary, PIPELINE_DATA, PipelineData, PipelineType, TASKS_DATA, TaskData, TaskDemo, TaskDemoEntry };
|
|
467
|
+
export { ExampleRepo, MODALITIES, MODALITY_LABELS, Modality, ModelLibrary, ModelLibraryKey, PIPELINE_DATA, PIPELINE_TYPES, PipelineData, PipelineType, TASKS_DATA, TaskData, TaskDemo, TaskDemoEntry };
|
package/dist/index.js
CHANGED
|
@@ -21,14 +21,25 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
21
21
|
var src_exports = {};
|
|
22
22
|
__export(src_exports, {
|
|
23
23
|
MODALITIES: () => MODALITIES,
|
|
24
|
+
MODALITY_LABELS: () => MODALITY_LABELS,
|
|
24
25
|
ModelLibrary: () => ModelLibrary,
|
|
25
26
|
PIPELINE_DATA: () => PIPELINE_DATA,
|
|
27
|
+
PIPELINE_TYPES: () => PIPELINE_TYPES,
|
|
26
28
|
TASKS_DATA: () => TASKS_DATA
|
|
27
29
|
});
|
|
28
30
|
module.exports = __toCommonJS(src_exports);
|
|
29
31
|
|
|
30
32
|
// src/pipelines.ts
|
|
31
33
|
var MODALITIES = ["cv", "nlp", "audio", "tabular", "multimodal", "rl", "other"];
|
|
34
|
+
var MODALITY_LABELS = {
|
|
35
|
+
multimodal: "Multimodal",
|
|
36
|
+
nlp: "Natural Language Processing",
|
|
37
|
+
audio: "Audio",
|
|
38
|
+
cv: "Computer Vision",
|
|
39
|
+
rl: "Reinforcement Learning",
|
|
40
|
+
tabular: "Tabular",
|
|
41
|
+
other: "Other"
|
|
42
|
+
};
|
|
32
43
|
var PIPELINE_DATA = {
|
|
33
44
|
"text-classification": {
|
|
34
45
|
name: "Text Classification",
|
|
@@ -574,6 +585,7 @@ var PIPELINE_DATA = {
|
|
|
574
585
|
hideInDatasets: true
|
|
575
586
|
}
|
|
576
587
|
};
|
|
588
|
+
var PIPELINE_TYPES = Object.keys(PIPELINE_DATA);
|
|
577
589
|
|
|
578
590
|
// src/audio-classification/data.ts
|
|
579
591
|
var taskData = {
|
|
@@ -3135,7 +3147,9 @@ var ModelLibrary = /* @__PURE__ */ ((ModelLibrary2) => {
|
|
|
3135
3147
|
// Annotate the CommonJS export names for ESM import in node:
|
|
3136
3148
|
0 && (module.exports = {
|
|
3137
3149
|
MODALITIES,
|
|
3150
|
+
MODALITY_LABELS,
|
|
3138
3151
|
ModelLibrary,
|
|
3139
3152
|
PIPELINE_DATA,
|
|
3153
|
+
PIPELINE_TYPES,
|
|
3140
3154
|
TASKS_DATA
|
|
3141
3155
|
});
|
package/dist/index.mjs
CHANGED
|
@@ -1,5 +1,14 @@
|
|
|
1
1
|
// src/pipelines.ts
|
|
2
2
|
var MODALITIES = ["cv", "nlp", "audio", "tabular", "multimodal", "rl", "other"];
|
|
3
|
+
var MODALITY_LABELS = {
|
|
4
|
+
multimodal: "Multimodal",
|
|
5
|
+
nlp: "Natural Language Processing",
|
|
6
|
+
audio: "Audio",
|
|
7
|
+
cv: "Computer Vision",
|
|
8
|
+
rl: "Reinforcement Learning",
|
|
9
|
+
tabular: "Tabular",
|
|
10
|
+
other: "Other"
|
|
11
|
+
};
|
|
3
12
|
var PIPELINE_DATA = {
|
|
4
13
|
"text-classification": {
|
|
5
14
|
name: "Text Classification",
|
|
@@ -545,6 +554,7 @@ var PIPELINE_DATA = {
|
|
|
545
554
|
hideInDatasets: true
|
|
546
555
|
}
|
|
547
556
|
};
|
|
557
|
+
var PIPELINE_TYPES = Object.keys(PIPELINE_DATA);
|
|
548
558
|
|
|
549
559
|
// src/audio-classification/data.ts
|
|
550
560
|
var taskData = {
|
|
@@ -3105,7 +3115,9 @@ var ModelLibrary = /* @__PURE__ */ ((ModelLibrary2) => {
|
|
|
3105
3115
|
})(ModelLibrary || {});
|
|
3106
3116
|
export {
|
|
3107
3117
|
MODALITIES,
|
|
3118
|
+
MODALITY_LABELS,
|
|
3108
3119
|
ModelLibrary,
|
|
3109
3120
|
PIPELINE_DATA,
|
|
3121
|
+
PIPELINE_TYPES,
|
|
3110
3122
|
TASKS_DATA
|
|
3111
3123
|
};
|
package/package.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@huggingface/tasks",
|
|
3
|
-
"packageManager": "pnpm@8.
|
|
4
|
-
"version": "0.0.
|
|
5
|
-
"description": "List of
|
|
3
|
+
"packageManager": "pnpm@8.10.5",
|
|
4
|
+
"version": "0.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": {
|
|
8
8
|
"access": "public"
|
|
@@ -39,6 +39,6 @@
|
|
|
39
39
|
"format": "prettier --write .",
|
|
40
40
|
"format:check": "prettier --check .",
|
|
41
41
|
"build": "tsup src/index.ts --format cjs,esm --clean --dts",
|
|
42
|
-
"
|
|
42
|
+
"check": "tsc"
|
|
43
43
|
}
|
|
44
44
|
}
|
|
@@ -65,9 +65,9 @@ Pix2Pix is a popular model used for image to image translation tasks. It is base
|
|
|
65
65
|
|
|
66
66
|
Below images show some of the examples shared in the paper that can be obtained using Pix2Pix. There are various cases this model can be applied on. It is capable of relatively simpler things, e.g. converting a grayscale image to its colored version. But more importantly, it can generate realistic pictures from rough sketches (can be seen in the purse example) or from painting-like images (can be seen in the street and facade examples below).
|
|
67
67
|
|
|
68
|
-
|
|
68
|
+

|
|
69
69
|
|
|
70
|
-
##
|
|
70
|
+
## Useful Resources
|
|
71
71
|
|
|
72
72
|
- [Train your ControlNet with diffusers 🧨](https://huggingface.co/blog/train-your-controlnet)
|
|
73
73
|
- [Ultra fast ControlNet with 🧨 Diffusers](https://huggingface.co/blog/controlnet)
|
package/src/index.ts
CHANGED
|
@@ -1,4 +1,13 @@
|
|
|
1
1
|
export type { TaskData, TaskDemo, TaskDemoEntry, ExampleRepo } from "./Types";
|
|
2
2
|
export { TASKS_DATA } from "./tasksData";
|
|
3
|
-
export {
|
|
3
|
+
export {
|
|
4
|
+
PIPELINE_DATA,
|
|
5
|
+
PIPELINE_TYPES,
|
|
6
|
+
type PipelineType,
|
|
7
|
+
type PipelineData,
|
|
8
|
+
type Modality,
|
|
9
|
+
MODALITIES,
|
|
10
|
+
MODALITY_LABELS,
|
|
11
|
+
} from "./pipelines";
|
|
4
12
|
export { ModelLibrary } from "./modelLibraries";
|
|
13
|
+
export type { ModelLibraryKey } from "./modelLibraries";
|
package/src/pipelines.ts
CHANGED
|
@@ -2,6 +2,16 @@ export const MODALITIES = ["cv", "nlp", "audio", "tabular", "multimodal", "rl",
|
|
|
2
2
|
|
|
3
3
|
export type Modality = (typeof MODALITIES)[number];
|
|
4
4
|
|
|
5
|
+
export const MODALITY_LABELS = {
|
|
6
|
+
multimodal: "Multimodal",
|
|
7
|
+
nlp: "Natural Language Processing",
|
|
8
|
+
audio: "Audio",
|
|
9
|
+
cv: "Computer Vision",
|
|
10
|
+
rl: "Reinforcement Learning",
|
|
11
|
+
tabular: "Tabular",
|
|
12
|
+
other: "Other",
|
|
13
|
+
} satisfies Record<Modality, string>;
|
|
14
|
+
|
|
5
15
|
/**
|
|
6
16
|
* Public interface for a sub task.
|
|
7
17
|
*
|
|
@@ -606,3 +616,4 @@ export const PIPELINE_DATA = {
|
|
|
606
616
|
} satisfies Record<string, PipelineData>;
|
|
607
617
|
|
|
608
618
|
export type PipelineType = keyof typeof PIPELINE_DATA;
|
|
619
|
+
export const PIPELINE_TYPES = Object.keys(PIPELINE_DATA) as PipelineType[];
|