@huggingface/tasks 0.18.1 → 0.18.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.
- package/dist/commonjs/snippets/inputs.js +24 -24
- package/dist/esm/snippets/inputs.js +24 -24
- package/package.json +1 -1
- package/src/snippets/inputs.ts +24 -24
|
@@ -5,25 +5,25 @@ const inputsZeroShotClassification = () => `"Hi, I recently bought a device from
|
|
|
5
5
|
const inputsTranslation = () => `"Меня зовут Вольфганг и я живу в Берлине"`;
|
|
6
6
|
const inputsSummarization = () => `"The tower is 324 metres (1,063 ft) tall, about the same height as an 81-storey building, and the tallest structure in Paris. Its base is square, measuring 125 metres (410 ft) on each side. During its construction, the Eiffel Tower surpassed the Washington Monument to become the tallest man-made structure in the world, a title it held for 41 years until the Chrysler Building in New York City was finished in 1930. It was the first structure to reach a height of 300 metres. Due to the addition of a broadcasting aerial at the top of the tower in 1957, it is now taller than the Chrysler Building by 5.2 metres (17 ft). Excluding transmitters, the Eiffel Tower is the second tallest free-standing structure in France after the Millau Viaduct."`;
|
|
7
7
|
const inputsTableQuestionAnswering = () => `{
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
8
|
+
"query": "How many stars does the transformers repository have?",
|
|
9
|
+
"table": {
|
|
10
|
+
"Repository": ["Transformers", "Datasets", "Tokenizers"],
|
|
11
|
+
"Stars": ["36542", "4512", "3934"],
|
|
12
|
+
"Contributors": ["651", "77", "34"],
|
|
13
|
+
"Programming language": [
|
|
14
|
+
"Python",
|
|
15
|
+
"Python",
|
|
16
|
+
"Rust, Python and NodeJS"
|
|
17
|
+
]
|
|
18
|
+
}
|
|
19
19
|
}`;
|
|
20
20
|
const inputsVisualQuestionAnswering = () => `{
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
21
|
+
"image": "cat.png",
|
|
22
|
+
"question": "What is in this image?"
|
|
23
|
+
}`;
|
|
24
24
|
const inputsQuestionAnswering = () => `{
|
|
25
|
-
|
|
26
|
-
|
|
25
|
+
"question": "What is my name?",
|
|
26
|
+
"context": "My name is Clara and I live in Berkeley."
|
|
27
27
|
}`;
|
|
28
28
|
const inputsTextClassification = () => `"I like you. I love you"`;
|
|
29
29
|
const inputsTokenClassification = () => `"My name is Sarah Jessica Parker but you can call me Jessica"`;
|
|
@@ -54,19 +54,19 @@ const inputsTextGeneration = (model) => {
|
|
|
54
54
|
const inputsText2TextGeneration = () => `"The answer to the universe is"`;
|
|
55
55
|
const inputsFillMask = (model) => `"The answer to the universe is ${model.mask_token}."`;
|
|
56
56
|
const inputsSentenceSimilarity = () => `{
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
57
|
+
"source_sentence": "That is a happy person",
|
|
58
|
+
"sentences": [
|
|
59
|
+
"That is a happy dog",
|
|
60
|
+
"That is a very happy person",
|
|
61
|
+
"Today is a sunny day"
|
|
62
|
+
]
|
|
63
63
|
}`;
|
|
64
64
|
const inputsFeatureExtraction = () => `"Today is a sunny day and I will get some ice cream."`;
|
|
65
65
|
const inputsImageClassification = () => `"cats.jpg"`;
|
|
66
66
|
const inputsImageToText = () => `"cats.jpg"`;
|
|
67
67
|
const inputsImageToImage = () => `{
|
|
68
|
-
|
|
69
|
-
|
|
68
|
+
"image": "cat.png",
|
|
69
|
+
"prompt": "Turn the cat into a tiger."
|
|
70
70
|
}`;
|
|
71
71
|
const inputsImageSegmentation = () => `"cats.jpg"`;
|
|
72
72
|
const inputsObjectDetection = () => `"cats.jpg"`;
|
|
@@ -2,25 +2,25 @@ const inputsZeroShotClassification = () => `"Hi, I recently bought a device from
|
|
|
2
2
|
const inputsTranslation = () => `"Меня зовут Вольфганг и я живу в Берлине"`;
|
|
3
3
|
const inputsSummarization = () => `"The tower is 324 metres (1,063 ft) tall, about the same height as an 81-storey building, and the tallest structure in Paris. Its base is square, measuring 125 metres (410 ft) on each side. During its construction, the Eiffel Tower surpassed the Washington Monument to become the tallest man-made structure in the world, a title it held for 41 years until the Chrysler Building in New York City was finished in 1930. It was the first structure to reach a height of 300 metres. Due to the addition of a broadcasting aerial at the top of the tower in 1957, it is now taller than the Chrysler Building by 5.2 metres (17 ft). Excluding transmitters, the Eiffel Tower is the second tallest free-standing structure in France after the Millau Viaduct."`;
|
|
4
4
|
const inputsTableQuestionAnswering = () => `{
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
5
|
+
"query": "How many stars does the transformers repository have?",
|
|
6
|
+
"table": {
|
|
7
|
+
"Repository": ["Transformers", "Datasets", "Tokenizers"],
|
|
8
|
+
"Stars": ["36542", "4512", "3934"],
|
|
9
|
+
"Contributors": ["651", "77", "34"],
|
|
10
|
+
"Programming language": [
|
|
11
|
+
"Python",
|
|
12
|
+
"Python",
|
|
13
|
+
"Rust, Python and NodeJS"
|
|
14
|
+
]
|
|
15
|
+
}
|
|
16
16
|
}`;
|
|
17
17
|
const inputsVisualQuestionAnswering = () => `{
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
18
|
+
"image": "cat.png",
|
|
19
|
+
"question": "What is in this image?"
|
|
20
|
+
}`;
|
|
21
21
|
const inputsQuestionAnswering = () => `{
|
|
22
|
-
|
|
23
|
-
|
|
22
|
+
"question": "What is my name?",
|
|
23
|
+
"context": "My name is Clara and I live in Berkeley."
|
|
24
24
|
}`;
|
|
25
25
|
const inputsTextClassification = () => `"I like you. I love you"`;
|
|
26
26
|
const inputsTokenClassification = () => `"My name is Sarah Jessica Parker but you can call me Jessica"`;
|
|
@@ -51,19 +51,19 @@ const inputsTextGeneration = (model) => {
|
|
|
51
51
|
const inputsText2TextGeneration = () => `"The answer to the universe is"`;
|
|
52
52
|
const inputsFillMask = (model) => `"The answer to the universe is ${model.mask_token}."`;
|
|
53
53
|
const inputsSentenceSimilarity = () => `{
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
54
|
+
"source_sentence": "That is a happy person",
|
|
55
|
+
"sentences": [
|
|
56
|
+
"That is a happy dog",
|
|
57
|
+
"That is a very happy person",
|
|
58
|
+
"Today is a sunny day"
|
|
59
|
+
]
|
|
60
60
|
}`;
|
|
61
61
|
const inputsFeatureExtraction = () => `"Today is a sunny day and I will get some ice cream."`;
|
|
62
62
|
const inputsImageClassification = () => `"cats.jpg"`;
|
|
63
63
|
const inputsImageToText = () => `"cats.jpg"`;
|
|
64
64
|
const inputsImageToImage = () => `{
|
|
65
|
-
|
|
66
|
-
|
|
65
|
+
"image": "cat.png",
|
|
66
|
+
"prompt": "Turn the cat into a tiger."
|
|
67
67
|
}`;
|
|
68
68
|
const inputsImageSegmentation = () => `"cats.jpg"`;
|
|
69
69
|
const inputsObjectDetection = () => `"cats.jpg"`;
|
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.18.
|
|
4
|
+
"version": "0.18.2",
|
|
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/snippets/inputs.ts
CHANGED
|
@@ -12,29 +12,29 @@ const inputsSummarization = () =>
|
|
|
12
12
|
|
|
13
13
|
const inputsTableQuestionAnswering = () =>
|
|
14
14
|
`{
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
15
|
+
"query": "How many stars does the transformers repository have?",
|
|
16
|
+
"table": {
|
|
17
|
+
"Repository": ["Transformers", "Datasets", "Tokenizers"],
|
|
18
|
+
"Stars": ["36542", "4512", "3934"],
|
|
19
|
+
"Contributors": ["651", "77", "34"],
|
|
20
|
+
"Programming language": [
|
|
21
|
+
"Python",
|
|
22
|
+
"Python",
|
|
23
|
+
"Rust, Python and NodeJS"
|
|
24
|
+
]
|
|
25
|
+
}
|
|
26
26
|
}`;
|
|
27
27
|
|
|
28
28
|
const inputsVisualQuestionAnswering = () =>
|
|
29
29
|
`{
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
30
|
+
"image": "cat.png",
|
|
31
|
+
"question": "What is in this image?"
|
|
32
|
+
}`;
|
|
33
33
|
|
|
34
34
|
const inputsQuestionAnswering = () =>
|
|
35
35
|
`{
|
|
36
|
-
|
|
37
|
-
|
|
36
|
+
"question": "What is my name?",
|
|
37
|
+
"context": "My name is Clara and I live in Berkeley."
|
|
38
38
|
}`;
|
|
39
39
|
|
|
40
40
|
const inputsTextClassification = () => `"I like you. I love you"`;
|
|
@@ -72,12 +72,12 @@ const inputsFillMask = (model: ModelDataMinimal) => `"The answer to the universe
|
|
|
72
72
|
|
|
73
73
|
const inputsSentenceSimilarity = () =>
|
|
74
74
|
`{
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
75
|
+
"source_sentence": "That is a happy person",
|
|
76
|
+
"sentences": [
|
|
77
|
+
"That is a happy dog",
|
|
78
|
+
"That is a very happy person",
|
|
79
|
+
"Today is a sunny day"
|
|
80
|
+
]
|
|
81
81
|
}`;
|
|
82
82
|
|
|
83
83
|
const inputsFeatureExtraction = () => `"Today is a sunny day and I will get some ice cream."`;
|
|
@@ -87,8 +87,8 @@ const inputsImageClassification = () => `"cats.jpg"`;
|
|
|
87
87
|
const inputsImageToText = () => `"cats.jpg"`;
|
|
88
88
|
|
|
89
89
|
const inputsImageToImage = () => `{
|
|
90
|
-
|
|
91
|
-
|
|
90
|
+
"image": "cat.png",
|
|
91
|
+
"prompt": "Turn the cat into a tiger."
|
|
92
92
|
}`;
|
|
93
93
|
|
|
94
94
|
const inputsImageSegmentation = () => `"cats.jpg"`;
|