@taskmagic/apps-hugging-face 0.0.1
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/README.md +3 -0
- package/package.json +47 -0
- package/src/index.d.ts +1 -0
- package/src/index.js +64 -0
- package/src/index.js.map +1 -0
- package/src/lib/actions/chat-completion.d.ts +18 -0
- package/src/lib/actions/chat-completion.js +537 -0
- package/src/lib/actions/chat-completion.js.map +1 -0
- package/src/lib/actions/create-image.d.ts +14 -0
- package/src/lib/actions/create-image.js +423 -0
- package/src/lib/actions/create-image.js.map +1 -0
- package/src/lib/actions/document-question-answering.d.ts +11 -0
- package/src/lib/actions/document-question-answering.js +140 -0
- package/src/lib/actions/document-question-answering.js.map +1 -0
- package/src/lib/actions/image-classification.d.ts +13 -0
- package/src/lib/actions/image-classification.js +592 -0
- package/src/lib/actions/image-classification.js.map +1 -0
- package/src/lib/actions/language-translation.d.ts +11 -0
- package/src/lib/actions/language-translation.js +222 -0
- package/src/lib/actions/language-translation.js.map +1 -0
- package/src/lib/actions/object-detection.d.ts +9 -0
- package/src/lib/actions/object-detection.js +464 -0
- package/src/lib/actions/object-detection.js.map +1 -0
- package/src/lib/actions/text-classification.d.ts +12 -0
- package/src/lib/actions/text-classification.js +344 -0
- package/src/lib/actions/text-classification.js.map +1 -0
- package/src/lib/actions/text-summarization.d.ts +12 -0
- package/src/lib/actions/text-summarization.js +420 -0
- package/src/lib/actions/text-summarization.js.map +1 -0
- package/src/lib/auth.d.ts +1 -0
- package/src/lib/auth.js +10 -0
- package/src/lib/auth.js.map +1 -0
- package/src/lib/common/index.d.ts +36 -0
- package/src/lib/common/index.js +78 -0
- package/src/lib/common/index.js.map +1 -0
|
@@ -0,0 +1,592 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.imageClassification = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const pieces_framework_1 = require("@taskmagic/pieces-framework");
|
|
6
|
+
const pieces_common_1 = require("@taskmagic/pieces-common");
|
|
7
|
+
const auth_1 = require("../auth");
|
|
8
|
+
const common_1 = require("../common");
|
|
9
|
+
exports.imageClassification = (0, pieces_framework_1.createAction)({
|
|
10
|
+
name: 'image_classification',
|
|
11
|
+
auth: auth_1.huggingFaceAuth,
|
|
12
|
+
displayName: 'Image Classification',
|
|
13
|
+
description: 'Classify images with pre-trained models or custom categories - perfect for content moderation, automated tagging, and smart asset management',
|
|
14
|
+
props: {
|
|
15
|
+
classificationMode: pieces_framework_1.Property.StaticDropdown({
|
|
16
|
+
displayName: 'Classification Mode',
|
|
17
|
+
description: 'How do you want to classify your images?',
|
|
18
|
+
required: true,
|
|
19
|
+
options: {
|
|
20
|
+
disabled: false,
|
|
21
|
+
options: [
|
|
22
|
+
{
|
|
23
|
+
label: '🏷️ Pre-trained Categories (Standard)',
|
|
24
|
+
value: 'standard',
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
label: '🎯 Custom Categories (Zero-shot)',
|
|
28
|
+
value: 'zero_shot',
|
|
29
|
+
},
|
|
30
|
+
],
|
|
31
|
+
},
|
|
32
|
+
defaultValue: 'standard',
|
|
33
|
+
}),
|
|
34
|
+
useCase: pieces_framework_1.Property.StaticDropdown({
|
|
35
|
+
displayName: 'Use Case',
|
|
36
|
+
description: 'What type of image classification do you need?',
|
|
37
|
+
required: true,
|
|
38
|
+
options: {
|
|
39
|
+
disabled: false,
|
|
40
|
+
options: [
|
|
41
|
+
{
|
|
42
|
+
label: '🛡️ Content Moderation & Safety',
|
|
43
|
+
value: 'moderation',
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
label: '🏷️ General Image Tagging',
|
|
47
|
+
value: 'general',
|
|
48
|
+
},
|
|
49
|
+
{
|
|
50
|
+
label: '👤 People & Demographics',
|
|
51
|
+
value: 'people',
|
|
52
|
+
},
|
|
53
|
+
{
|
|
54
|
+
label: '🎨 Creative & Media',
|
|
55
|
+
value: 'creative',
|
|
56
|
+
},
|
|
57
|
+
{
|
|
58
|
+
label: '💼 Business & Commerce',
|
|
59
|
+
value: 'business',
|
|
60
|
+
},
|
|
61
|
+
{
|
|
62
|
+
label: '🔍 Search All Models',
|
|
63
|
+
value: 'search',
|
|
64
|
+
},
|
|
65
|
+
],
|
|
66
|
+
},
|
|
67
|
+
defaultValue: 'general',
|
|
68
|
+
}),
|
|
69
|
+
model: pieces_framework_1.Property.Dropdown({
|
|
70
|
+
displayName: 'Classification Model',
|
|
71
|
+
description: 'Select the best model for your use case',
|
|
72
|
+
required: true,
|
|
73
|
+
refreshers: ['classificationMode', 'useCase'],
|
|
74
|
+
options: (_a) => tslib_1.__awaiter(void 0, [_a], void 0, function* ({ classificationMode, useCase }) {
|
|
75
|
+
const getModelsByUseCase = (mode, type) => {
|
|
76
|
+
if (mode === 'zero_shot') {
|
|
77
|
+
return [
|
|
78
|
+
{
|
|
79
|
+
label: 'CLIP ViT Base (⚡ Fast & Versatile)',
|
|
80
|
+
value: 'openai/clip-vit-base-patch32',
|
|
81
|
+
description: '18.5M downloads | General purpose zero-shot',
|
|
82
|
+
},
|
|
83
|
+
{
|
|
84
|
+
label: 'CLIP ViT Large (🏆 High Accuracy)',
|
|
85
|
+
value: 'openai/clip-vit-large-patch14',
|
|
86
|
+
description: '9.3M downloads | Best accuracy for complex scenes',
|
|
87
|
+
},
|
|
88
|
+
{
|
|
89
|
+
label: 'CLIP ViT Large 336 (🔬 Ultra Precise)',
|
|
90
|
+
value: 'openai/clip-vit-large-patch14-336',
|
|
91
|
+
description: '7.9M downloads | Highest resolution processing',
|
|
92
|
+
},
|
|
93
|
+
{
|
|
94
|
+
label: 'Fashion CLIP (👗 Fashion Specialized)',
|
|
95
|
+
value: 'patrickjohncyh/fashion-clip',
|
|
96
|
+
description: '2.9M downloads | Perfect for fashion & retail',
|
|
97
|
+
},
|
|
98
|
+
];
|
|
99
|
+
}
|
|
100
|
+
switch (type) {
|
|
101
|
+
case 'moderation':
|
|
102
|
+
return [
|
|
103
|
+
{
|
|
104
|
+
label: 'NSFW Detection (🛡️ Content Safety)',
|
|
105
|
+
value: 'Falconsai/nsfw_image_detection',
|
|
106
|
+
description: '115M downloads | Industry-leading safety',
|
|
107
|
+
},
|
|
108
|
+
{
|
|
109
|
+
label: 'AdamCodd NSFW Detector (🔍 Alternative Safety)',
|
|
110
|
+
value: 'AdamCodd/vit-base-nsfw-detector',
|
|
111
|
+
description: '745K downloads | Reliable content filtering',
|
|
112
|
+
},
|
|
113
|
+
{
|
|
114
|
+
label: 'ViT Base General (📊 Multi-purpose Safety)',
|
|
115
|
+
value: 'google/vit-base-patch16-224',
|
|
116
|
+
description: '3.5M downloads | General classification + safety',
|
|
117
|
+
},
|
|
118
|
+
];
|
|
119
|
+
case 'people':
|
|
120
|
+
return [
|
|
121
|
+
{
|
|
122
|
+
label: 'Face Expression Detection (😊 Emotion Analysis)',
|
|
123
|
+
value: 'trpakov/vit-face-expression',
|
|
124
|
+
description: '5.4M downloads | 7 emotion categories',
|
|
125
|
+
},
|
|
126
|
+
{
|
|
127
|
+
label: 'Age Classification (👶 Age Detection)',
|
|
128
|
+
value: 'nateraw/vit-age-classifier',
|
|
129
|
+
description: '1.2M downloads | Age group classification',
|
|
130
|
+
},
|
|
131
|
+
{
|
|
132
|
+
label: 'FairFace Age Detection (📊 Demographic Analysis)',
|
|
133
|
+
value: 'dima806/fairface_age_image_detection',
|
|
134
|
+
description: '67M downloads | Professional demographics',
|
|
135
|
+
},
|
|
136
|
+
{
|
|
137
|
+
label: 'Gender Classification (👥 Gender Analysis)',
|
|
138
|
+
value: 'rizvandwiki/gender-classification',
|
|
139
|
+
description: '1.1M downloads | Binary gender classification',
|
|
140
|
+
},
|
|
141
|
+
];
|
|
142
|
+
case 'general':
|
|
143
|
+
return [
|
|
144
|
+
{
|
|
145
|
+
label: 'ViT Base Patch16 (🏆 Industry Standard)',
|
|
146
|
+
value: 'google/vit-base-patch16-224',
|
|
147
|
+
description: '3.5M downloads | 1000+ ImageNet categories',
|
|
148
|
+
},
|
|
149
|
+
{
|
|
150
|
+
label: 'ResNet-50 (⚡ Fast & Reliable)',
|
|
151
|
+
value: 'timm/resnet50.a1_in1k',
|
|
152
|
+
description: '16.8M downloads | Classic CNN architecture',
|
|
153
|
+
},
|
|
154
|
+
{
|
|
155
|
+
label: 'ResNet-18 (🚀 Ultra Fast)',
|
|
156
|
+
value: 'timm/resnet18.a1_in1k',
|
|
157
|
+
description: '4.8M downloads | Lightweight classification',
|
|
158
|
+
},
|
|
159
|
+
{
|
|
160
|
+
label: 'MobileNet V3 (📱 Mobile Optimized)',
|
|
161
|
+
value: 'timm/mobilenetv3_small_100.lamb_in1k',
|
|
162
|
+
description: '53M downloads | Edge deployment ready',
|
|
163
|
+
},
|
|
164
|
+
];
|
|
165
|
+
case 'creative':
|
|
166
|
+
return [
|
|
167
|
+
{
|
|
168
|
+
label: 'ViT Base Patch16 (🎨 Creative Content)',
|
|
169
|
+
value: 'google/vit-base-patch16-224',
|
|
170
|
+
description: '3.5M downloads | Art, design, creative analysis',
|
|
171
|
+
},
|
|
172
|
+
{
|
|
173
|
+
label: 'MobileViT Small (📸 Media Processing)',
|
|
174
|
+
value: 'apple/mobilevit-small',
|
|
175
|
+
description: '1.3M downloads | Optimized for media workflows',
|
|
176
|
+
},
|
|
177
|
+
{
|
|
178
|
+
label: 'ResNet-50 (🖼️ Image Analysis)',
|
|
179
|
+
value: 'timm/resnet50.a1_in1k',
|
|
180
|
+
description: '16.8M downloads | Versatile image understanding',
|
|
181
|
+
},
|
|
182
|
+
];
|
|
183
|
+
case 'business':
|
|
184
|
+
return [
|
|
185
|
+
{
|
|
186
|
+
label: 'ViT Base Patch16 (💼 Business Ready)',
|
|
187
|
+
value: 'google/vit-base-patch16-224',
|
|
188
|
+
description: '3.5M downloads | Professional grade accuracy',
|
|
189
|
+
},
|
|
190
|
+
{
|
|
191
|
+
label: 'Fashion CLIP (🛍️ E-commerce)',
|
|
192
|
+
value: 'patrickjohncyh/fashion-clip',
|
|
193
|
+
description: '2.9M downloads | Product categorization',
|
|
194
|
+
},
|
|
195
|
+
{
|
|
196
|
+
label: 'ResNet-50 (📊 Business Intelligence)',
|
|
197
|
+
value: 'timm/resnet50.a1_in1k',
|
|
198
|
+
description: '16.8M downloads | Reliable business workflows',
|
|
199
|
+
},
|
|
200
|
+
];
|
|
201
|
+
default:
|
|
202
|
+
return [];
|
|
203
|
+
}
|
|
204
|
+
};
|
|
205
|
+
if (useCase === 'search') {
|
|
206
|
+
try {
|
|
207
|
+
const pipelineTag = classificationMode === 'zero_shot'
|
|
208
|
+
? 'zero-shot-image-classification'
|
|
209
|
+
: 'image-classification';
|
|
210
|
+
const response = yield pieces_common_1.httpClient.sendRequest({
|
|
211
|
+
method: pieces_common_1.HttpMethod.GET,
|
|
212
|
+
url: `https://huggingface.co/api/models?pipeline_tag=${pipelineTag}&sort=downloads&limit=50`,
|
|
213
|
+
});
|
|
214
|
+
const models = response.body;
|
|
215
|
+
return {
|
|
216
|
+
disabled: false,
|
|
217
|
+
placeholder: 'Select from popular models...',
|
|
218
|
+
options: models
|
|
219
|
+
.filter((model) => model.downloads > 10000)
|
|
220
|
+
.slice(0, 20)
|
|
221
|
+
.map((model) => ({
|
|
222
|
+
label: `${model.id} (${(model.downloads / 1000).toFixed(0)}K downloads)`,
|
|
223
|
+
value: model.id,
|
|
224
|
+
})),
|
|
225
|
+
};
|
|
226
|
+
}
|
|
227
|
+
catch (error) {
|
|
228
|
+
return {
|
|
229
|
+
disabled: false,
|
|
230
|
+
options: getModelsByUseCase(classificationMode, 'general'),
|
|
231
|
+
};
|
|
232
|
+
}
|
|
233
|
+
}
|
|
234
|
+
return {
|
|
235
|
+
disabled: false,
|
|
236
|
+
options: getModelsByUseCase(classificationMode, useCase),
|
|
237
|
+
};
|
|
238
|
+
}),
|
|
239
|
+
}),
|
|
240
|
+
imageSource: pieces_framework_1.Property.StaticDropdown({
|
|
241
|
+
displayName: 'Image Source',
|
|
242
|
+
description: 'How do you want to provide the image?',
|
|
243
|
+
required: true,
|
|
244
|
+
options: {
|
|
245
|
+
disabled: false,
|
|
246
|
+
options: [
|
|
247
|
+
{ label: '📎 Upload File', value: 'upload' },
|
|
248
|
+
{ label: '🔗 Image URL', value: 'url' },
|
|
249
|
+
],
|
|
250
|
+
},
|
|
251
|
+
defaultValue: 'upload',
|
|
252
|
+
}),
|
|
253
|
+
imageFile: pieces_framework_1.Property.File({
|
|
254
|
+
displayName: 'Image File',
|
|
255
|
+
description: 'Upload an image file for classification (JPG, PNG, WebP)',
|
|
256
|
+
required: true,
|
|
257
|
+
}),
|
|
258
|
+
imageUrl: pieces_framework_1.Property.ShortText({
|
|
259
|
+
displayName: 'Image URL',
|
|
260
|
+
description: 'URL of the image to classify',
|
|
261
|
+
required: true,
|
|
262
|
+
}),
|
|
263
|
+
customCategories: pieces_framework_1.Property.Array({
|
|
264
|
+
displayName: 'Custom Categories',
|
|
265
|
+
description: 'Enter the categories you want to classify the image into (e.g., "dog", "cat", "bird")',
|
|
266
|
+
required: true,
|
|
267
|
+
}),
|
|
268
|
+
hypothesisTemplate: pieces_framework_1.Property.ShortText({
|
|
269
|
+
displayName: 'Classification Template',
|
|
270
|
+
description: 'Template for classification (advanced). Default: "This image shows {}"',
|
|
271
|
+
required: false,
|
|
272
|
+
defaultValue: 'This image shows {}',
|
|
273
|
+
}),
|
|
274
|
+
topK: pieces_framework_1.Property.Number({
|
|
275
|
+
displayName: 'Number of Results',
|
|
276
|
+
description: 'Maximum number of classification results to return (1-20)',
|
|
277
|
+
required: false,
|
|
278
|
+
defaultValue: 5,
|
|
279
|
+
}),
|
|
280
|
+
confidenceThreshold: pieces_framework_1.Property.Number({
|
|
281
|
+
displayName: 'Confidence Threshold',
|
|
282
|
+
description: 'Minimum confidence score for results (0.0-1.0)',
|
|
283
|
+
required: false,
|
|
284
|
+
defaultValue: 0.1,
|
|
285
|
+
}),
|
|
286
|
+
outputFormat: pieces_framework_1.Property.StaticDropdown({
|
|
287
|
+
displayName: 'Output Format',
|
|
288
|
+
description: 'How to structure the classification results',
|
|
289
|
+
required: false,
|
|
290
|
+
options: {
|
|
291
|
+
disabled: false,
|
|
292
|
+
options: [
|
|
293
|
+
{ label: '📋 Business Summary', value: 'business' },
|
|
294
|
+
{ label: '🔧 Technical Details', value: 'technical' },
|
|
295
|
+
{ label: '📊 Statistical Analysis', value: 'analytics' },
|
|
296
|
+
{ label: '🌐 Comprehensive Report', value: 'comprehensive' },
|
|
297
|
+
],
|
|
298
|
+
},
|
|
299
|
+
defaultValue: 'business',
|
|
300
|
+
}),
|
|
301
|
+
},
|
|
302
|
+
run(context) {
|
|
303
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
304
|
+
var _a, _b, _c, _d, _e;
|
|
305
|
+
const { classificationMode, useCase, model, imageSource, imageFile, imageUrl, customCategories, hypothesisTemplate, topK, confidenceThreshold, outputFormat, } = context.propsValue;
|
|
306
|
+
const actualHypothesisTemplate = Array.isArray(hypothesisTemplate)
|
|
307
|
+
? hypothesisTemplate[0] || 'This image shows {}'
|
|
308
|
+
: hypothesisTemplate || 'This image shows {}';
|
|
309
|
+
const actualImageUrl = Array.isArray(imageUrl)
|
|
310
|
+
? imageUrl[0] || ''
|
|
311
|
+
: imageUrl || '';
|
|
312
|
+
if (classificationMode === 'zero_shot' &&
|
|
313
|
+
(!customCategories || customCategories.length === 0)) {
|
|
314
|
+
throw new Error('Please provide custom categories for zero-shot classification');
|
|
315
|
+
}
|
|
316
|
+
if (imageSource === 'upload' && !(imageFile === null || imageFile === void 0 ? void 0 : imageFile.data)) {
|
|
317
|
+
throw new Error('Please upload an image file');
|
|
318
|
+
}
|
|
319
|
+
if (imageSource === 'url' && !actualImageUrl.trim()) {
|
|
320
|
+
throw new Error('Please provide an image URL');
|
|
321
|
+
}
|
|
322
|
+
// Resolve image bytes + content type
|
|
323
|
+
let imageBytes;
|
|
324
|
+
let imageContentType;
|
|
325
|
+
let imageName;
|
|
326
|
+
if (imageSource === 'upload') {
|
|
327
|
+
imageContentType = (0, common_1.getMimeType)(imageFile.filename);
|
|
328
|
+
imageBytes = Buffer.from(imageFile.data);
|
|
329
|
+
imageName = imageFile.filename;
|
|
330
|
+
}
|
|
331
|
+
else {
|
|
332
|
+
try {
|
|
333
|
+
const imageResponse = yield pieces_common_1.httpClient.sendRequest({
|
|
334
|
+
method: pieces_common_1.HttpMethod.GET,
|
|
335
|
+
url: actualImageUrl.trim(),
|
|
336
|
+
responseType: 'arraybuffer',
|
|
337
|
+
});
|
|
338
|
+
const urlParts = actualImageUrl.split('/');
|
|
339
|
+
imageName = urlParts[urlParts.length - 1] || 'image';
|
|
340
|
+
// Determine MIME type from response headers
|
|
341
|
+
const responseHeaders = imageResponse.headers || {};
|
|
342
|
+
const contentTypeHeader = responseHeaders['content-type'];
|
|
343
|
+
imageContentType =
|
|
344
|
+
(Array.isArray(contentTypeHeader)
|
|
345
|
+
? contentTypeHeader[0]
|
|
346
|
+
: contentTypeHeader) || 'image/jpeg';
|
|
347
|
+
imageBytes = Buffer.from(imageResponse.body);
|
|
348
|
+
}
|
|
349
|
+
catch (error) {
|
|
350
|
+
throw new Error(`Failed to fetch image from URL: ${error instanceof Error ? error.message : String(error)}`);
|
|
351
|
+
}
|
|
352
|
+
}
|
|
353
|
+
const startTime = Date.now();
|
|
354
|
+
try {
|
|
355
|
+
let classificationResults;
|
|
356
|
+
if (classificationMode === 'zero_shot') {
|
|
357
|
+
const candidateLabels = Array.isArray(customCategories)
|
|
358
|
+
? customCategories.map((cat) => String(cat).trim()).filter(Boolean)
|
|
359
|
+
: [String(customCategories).trim()].filter(Boolean);
|
|
360
|
+
classificationResults = yield (0, common_1.callPipelineTask)({
|
|
361
|
+
auth: context.auth,
|
|
362
|
+
model: model,
|
|
363
|
+
body: {
|
|
364
|
+
inputs: {
|
|
365
|
+
image: imageBytes.toString('base64'),
|
|
366
|
+
},
|
|
367
|
+
parameters: {
|
|
368
|
+
candidate_labels: candidateLabels,
|
|
369
|
+
hypothesis_template: actualHypothesisTemplate,
|
|
370
|
+
},
|
|
371
|
+
},
|
|
372
|
+
});
|
|
373
|
+
}
|
|
374
|
+
else {
|
|
375
|
+
classificationResults = yield (0, common_1.callBinaryTask)({
|
|
376
|
+
auth: context.auth,
|
|
377
|
+
model: model,
|
|
378
|
+
data: imageBytes,
|
|
379
|
+
contentType: imageContentType,
|
|
380
|
+
});
|
|
381
|
+
}
|
|
382
|
+
const processingTime = (Date.now() - startTime) / 1000;
|
|
383
|
+
const filteredResults = classificationResults.filter((result) => result.score >= (confidenceThreshold || 0.1));
|
|
384
|
+
const limitedResults = filteredResults.slice(0, topK || 5);
|
|
385
|
+
const confidenceScores = limitedResults.map((r) => r.score);
|
|
386
|
+
const avgConfidence = confidenceScores.reduce((sum, score) => sum + score, 0) /
|
|
387
|
+
confidenceScores.length;
|
|
388
|
+
const maxConfidence = Math.max(...confidenceScores);
|
|
389
|
+
const minConfidence = Math.min(...confidenceScores);
|
|
390
|
+
const enhancedResults = limitedResults.map((result, index) => ({
|
|
391
|
+
rank: index + 1,
|
|
392
|
+
label: result.label,
|
|
393
|
+
confidence: Math.round(result.score * 100) / 100,
|
|
394
|
+
confidencePercent: Math.round(result.score * 100),
|
|
395
|
+
category: result.label,
|
|
396
|
+
isHighConfidence: result.score > 0.7,
|
|
397
|
+
isMediumConfidence: result.score > 0.4 && result.score <= 0.7,
|
|
398
|
+
isLowConfidence: result.score <= 0.4,
|
|
399
|
+
}));
|
|
400
|
+
const topCategory = ((_a = enhancedResults[0]) === null || _a === void 0 ? void 0 : _a.label) || 'unknown';
|
|
401
|
+
const highConfidenceCount = enhancedResults.filter((r) => r.isHighConfidence).length;
|
|
402
|
+
const categoryDistribution = enhancedResults.reduce((acc, result) => {
|
|
403
|
+
acc[result.label] = result.confidence;
|
|
404
|
+
return acc;
|
|
405
|
+
}, {});
|
|
406
|
+
const businessSummary = {
|
|
407
|
+
topCategory: topCategory,
|
|
408
|
+
topConfidence: Math.round((((_b = enhancedResults[0]) === null || _b === void 0 ? void 0 : _b.confidence) || 0) * 100),
|
|
409
|
+
totalCategories: enhancedResults.length,
|
|
410
|
+
highConfidenceResults: highConfidenceCount,
|
|
411
|
+
recommendedAction: getRecommendedAction(topCategory, ((_c = enhancedResults[0]) === null || _c === void 0 ? void 0 : _c.confidence) || 0, useCase),
|
|
412
|
+
};
|
|
413
|
+
const technicalDetails = {
|
|
414
|
+
model: model,
|
|
415
|
+
classificationMode: classificationMode,
|
|
416
|
+
processingTimeSeconds: processingTime,
|
|
417
|
+
originalResultCount: classificationResults.length,
|
|
418
|
+
filteredResultCount: filteredResults.length,
|
|
419
|
+
confidenceThreshold: confidenceThreshold || 0.1,
|
|
420
|
+
imageSource: imageSource,
|
|
421
|
+
imageName: imageName,
|
|
422
|
+
};
|
|
423
|
+
const analytics = {
|
|
424
|
+
confidenceStatistics: {
|
|
425
|
+
average: avgConfidence,
|
|
426
|
+
maximum: maxConfidence,
|
|
427
|
+
minimum: minConfidence,
|
|
428
|
+
standardDeviation: calculateStandardDeviation(confidenceScores),
|
|
429
|
+
},
|
|
430
|
+
categoryDistribution: categoryDistribution,
|
|
431
|
+
qualityMetrics: {
|
|
432
|
+
highConfidenceResults: enhancedResults.filter((r) => r.isHighConfidence).length,
|
|
433
|
+
mediumConfidenceResults: enhancedResults.filter((r) => r.isMediumConfidence).length,
|
|
434
|
+
lowConfidenceResults: enhancedResults.filter((r) => r.isLowConfidence)
|
|
435
|
+
.length,
|
|
436
|
+
},
|
|
437
|
+
customCategories: classificationMode === 'zero_shot' ? customCategories : undefined,
|
|
438
|
+
};
|
|
439
|
+
// Build response based on output format
|
|
440
|
+
const baseResponse = {
|
|
441
|
+
classifications: enhancedResults,
|
|
442
|
+
summary: businessSummary,
|
|
443
|
+
};
|
|
444
|
+
if (outputFormat === 'technical') {
|
|
445
|
+
Object.assign(baseResponse, { technical: technicalDetails });
|
|
446
|
+
}
|
|
447
|
+
else if (outputFormat === 'analytics') {
|
|
448
|
+
Object.assign(baseResponse, { analytics: analytics });
|
|
449
|
+
}
|
|
450
|
+
else if (outputFormat === 'comprehensive') {
|
|
451
|
+
Object.assign(baseResponse, {
|
|
452
|
+
technical: technicalDetails,
|
|
453
|
+
analytics: analytics,
|
|
454
|
+
});
|
|
455
|
+
}
|
|
456
|
+
return Object.assign(Object.assign({}, baseResponse), { classification: {
|
|
457
|
+
mode: classificationMode,
|
|
458
|
+
useCase: useCase,
|
|
459
|
+
model: model,
|
|
460
|
+
topCategory: topCategory,
|
|
461
|
+
confidence: ((_d = enhancedResults[0]) === null || _d === void 0 ? void 0 : _d.confidence) || 0,
|
|
462
|
+
}, metrics: {
|
|
463
|
+
processingTimeSeconds: processingTime,
|
|
464
|
+
totalResults: classificationResults.length,
|
|
465
|
+
displayedResults: enhancedResults.length,
|
|
466
|
+
averageConfidence: Math.round(avgConfidence * 100),
|
|
467
|
+
estimatedCost: calculateEstimatedCost(model),
|
|
468
|
+
}, businessInsights: {
|
|
469
|
+
useCase: getUseCaseDescription(useCase, classificationMode),
|
|
470
|
+
classificationTips: getClassificationTips(enhancedResults, classificationMode, useCase),
|
|
471
|
+
nextSteps: getNextSteps(useCase, topCategory, ((_e = enhancedResults[0]) === null || _e === void 0 ? void 0 : _e.confidence) || 0),
|
|
472
|
+
}, rawResults: classificationResults });
|
|
473
|
+
}
|
|
474
|
+
catch (error) {
|
|
475
|
+
const errorMessage = error instanceof Error ? error.message : String(error);
|
|
476
|
+
throw new Error(`Image classification failed: ${errorMessage}`);
|
|
477
|
+
}
|
|
478
|
+
});
|
|
479
|
+
},
|
|
480
|
+
});
|
|
481
|
+
function calculateStandardDeviation(values) {
|
|
482
|
+
if (values.length === 0)
|
|
483
|
+
return 0;
|
|
484
|
+
const avg = values.reduce((sum, val) => sum + val, 0) / values.length;
|
|
485
|
+
const squareDiffs = values.map((val) => Math.pow(val - avg, 2));
|
|
486
|
+
const variance = squareDiffs.reduce((sum, val) => sum + val, 0) / values.length;
|
|
487
|
+
return Math.sqrt(variance);
|
|
488
|
+
}
|
|
489
|
+
function getRecommendedAction(category, confidence, useCase) {
|
|
490
|
+
if (confidence > 0.8) {
|
|
491
|
+
if (useCase === 'moderation') {
|
|
492
|
+
return category.toLowerCase().includes('nsfw') ||
|
|
493
|
+
category.toLowerCase().includes('inappropriate')
|
|
494
|
+
? '🚨 Block content - high confidence inappropriate material'
|
|
495
|
+
: '✅ Approve content - safe for publication';
|
|
496
|
+
}
|
|
497
|
+
return `✅ High confidence classification as "${category}" - proceed with automated action`;
|
|
498
|
+
}
|
|
499
|
+
else if (confidence > 0.5) {
|
|
500
|
+
return `⚠️ Medium confidence - consider manual review for "${category}"`;
|
|
501
|
+
}
|
|
502
|
+
else {
|
|
503
|
+
return `❓ Low confidence - manual review recommended`;
|
|
504
|
+
}
|
|
505
|
+
}
|
|
506
|
+
function getUseCaseDescription(useCase, mode) {
|
|
507
|
+
const descriptions = {
|
|
508
|
+
moderation: 'Content safety and moderation for safe user experiences',
|
|
509
|
+
general: `${mode === 'zero_shot' ? 'Custom category' : 'General purpose'} image classification and tagging`,
|
|
510
|
+
people: 'Human-focused analysis for demographics and emotions',
|
|
511
|
+
creative: 'Creative content analysis for media and design workflows',
|
|
512
|
+
business: 'Business-grade classification for commerce and automation',
|
|
513
|
+
search: 'Custom model selection for specialized classification needs',
|
|
514
|
+
};
|
|
515
|
+
return (descriptions[useCase] ||
|
|
516
|
+
'AI-powered image classification');
|
|
517
|
+
}
|
|
518
|
+
function getClassificationTips(results, mode, useCase) {
|
|
519
|
+
const tips = [];
|
|
520
|
+
if (results.length === 0) {
|
|
521
|
+
tips.push('🔍 No confident classifications found - try adjusting the confidence threshold');
|
|
522
|
+
}
|
|
523
|
+
else {
|
|
524
|
+
const topResult = results[0];
|
|
525
|
+
if (topResult.confidence > 0.8) {
|
|
526
|
+
tips.push('✅ High confidence classification - reliable for automated decisions');
|
|
527
|
+
}
|
|
528
|
+
else if (topResult.confidence > 0.5) {
|
|
529
|
+
tips.push('⚖️ Medium confidence - good for most use cases');
|
|
530
|
+
}
|
|
531
|
+
else {
|
|
532
|
+
tips.push('⚠️ Low confidence - consider manual review or different model');
|
|
533
|
+
}
|
|
534
|
+
if (mode === 'zero_shot') {
|
|
535
|
+
tips.push('🎯 Zero-shot mode allows custom categories - refine labels for better accuracy');
|
|
536
|
+
}
|
|
537
|
+
if (useCase === 'moderation' &&
|
|
538
|
+
results.some((r) => r.label.toLowerCase().includes('nsfw'))) {
|
|
539
|
+
tips.push('🛡️ Content moderation detected - implement appropriate content policies');
|
|
540
|
+
}
|
|
541
|
+
const highConfidenceCount = results.filter((r) => r.isHighConfidence).length;
|
|
542
|
+
if (highConfidenceCount > 3) {
|
|
543
|
+
tips.push('📊 Multiple high-confidence matches - image may fit several categories');
|
|
544
|
+
}
|
|
545
|
+
}
|
|
546
|
+
if (tips.length === 0) {
|
|
547
|
+
tips.push('💡 Good classification results - suitable for automated processing');
|
|
548
|
+
}
|
|
549
|
+
return tips;
|
|
550
|
+
}
|
|
551
|
+
function getNextSteps(useCase, topCategory, confidence) {
|
|
552
|
+
const steps = [];
|
|
553
|
+
if (useCase === 'moderation') {
|
|
554
|
+
steps.push('🛡️ Implement content filtering rules based on classifications');
|
|
555
|
+
steps.push('📊 Set up monitoring dashboards for content safety metrics');
|
|
556
|
+
}
|
|
557
|
+
else if (useCase === 'business') {
|
|
558
|
+
steps.push('🏷️ Automate product tagging and categorization workflows');
|
|
559
|
+
steps.push('📈 Analyze classification patterns for business insights');
|
|
560
|
+
}
|
|
561
|
+
else if (useCase === 'general') {
|
|
562
|
+
steps.push('📁 Create automated file organization based on classifications');
|
|
563
|
+
steps.push('🔍 Build searchable metadata from image classifications');
|
|
564
|
+
}
|
|
565
|
+
if (confidence > 0.8) {
|
|
566
|
+
steps.push('⚡ Enable fully automated processing for high-confidence results');
|
|
567
|
+
}
|
|
568
|
+
else {
|
|
569
|
+
steps.push('👁️ Set up human review workflows for low-confidence results');
|
|
570
|
+
}
|
|
571
|
+
steps.push('💾 Save successful classification settings for consistent results');
|
|
572
|
+
steps.push('🔄 Process image batches with the same model configuration');
|
|
573
|
+
return steps;
|
|
574
|
+
}
|
|
575
|
+
function calculateEstimatedCost(model) {
|
|
576
|
+
const baseClassificationCost = 0.0005; // Cost per classification
|
|
577
|
+
const modelMultiplier = model.includes('clip-vit-large')
|
|
578
|
+
? 2.0
|
|
579
|
+
: model.includes('vit-base')
|
|
580
|
+
? 1.5
|
|
581
|
+
: model.includes('resnet')
|
|
582
|
+
? 1.0
|
|
583
|
+
: model.includes('mobile')
|
|
584
|
+
? 0.5
|
|
585
|
+
: 1.0;
|
|
586
|
+
const estimatedCost = baseClassificationCost * modelMultiplier;
|
|
587
|
+
if (estimatedCost < 0.001) {
|
|
588
|
+
return '< $0.001';
|
|
589
|
+
}
|
|
590
|
+
return `~$${estimatedCost.toFixed(4)}`;
|
|
591
|
+
}
|
|
592
|
+
//# sourceMappingURL=image-classification.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"image-classification.js","sourceRoot":"","sources":["../../../../../../../../packages/pieces/community/hugging-face/src/lib/actions/image-classification.ts"],"names":[],"mappings":";;;;AAAA,kEAAqE;AACrE,4DAAkE;AAClE,kCAA0C;AAC1C,sCAA0E;AAI7D,QAAA,mBAAmB,GAAG,IAAA,+BAAY,EAAC;IAC9C,IAAI,EAAE,sBAAsB;IAC5B,IAAI,EAAE,sBAAe;IACrB,WAAW,EAAE,sBAAsB;IACnC,WAAW,EACT,8IAA8I;IAChJ,KAAK,EAAE;QACL,kBAAkB,EAAE,2BAAQ,CAAC,cAAc,CAAC;YAC1C,WAAW,EAAE,qBAAqB;YAClC,WAAW,EAAE,0CAA0C;YACvD,QAAQ,EAAE,IAAI;YACd,OAAO,EAAE;gBACP,QAAQ,EAAE,KAAK;gBACf,OAAO,EAAE;oBACP;wBACE,KAAK,EAAE,uCAAuC;wBAC9C,KAAK,EAAE,UAAU;qBAClB;oBACD;wBAC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,CAAC,KAAK,CAAC,QAAQ,CAAC,UAAU,CAAC;YAC5B,CAAC,CAAC,GAAG;YACL,CAAC,CAAC,KAAK,CAAC,QAAQ,CAAC,QAAQ,CAAC;gBAC1B,CAAC,CAAC,GAAG;gBACL,CAAC,CAAC,KAAK,CAAC,QAAQ,CAAC,QAAQ,CAAC;oBAC1B,CAAC,CAAC,GAAG;oBACL,CAAC,CAAC,GAAG,CAAC;IAER,MAAM,aAAa,GAAG,sBAAsB,GAAG,eAAe,CAAC;IAE/D,IAAI,aAAa,GAAG,KAAK,EAAE,CAAC;QAC1B,OAAO,UAAU,CAAC;IACpB,CAAC;IAED,OAAO,KAAK,aAAa,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,CAAC;AACzC,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export declare const languageTranslation: import("@taskmagic/pieces-framework").IAction<import("@taskmagic/pieces-framework").SecretTextProperty<true>, {
|
|
2
|
+
model: import("@taskmagic/pieces-framework").DropdownProperty<string, true>;
|
|
3
|
+
customModel: import("@taskmagic/pieces-framework").ShortTextProperty<false>;
|
|
4
|
+
text: import("@taskmagic/pieces-framework").LongTextProperty<true>;
|
|
5
|
+
sourceLanguage: import("@taskmagic/pieces-framework").ShortTextProperty<false>;
|
|
6
|
+
targetLanguage: import("@taskmagic/pieces-framework").ShortTextProperty<false>;
|
|
7
|
+
cleanUpSpaces: import("@taskmagic/pieces-framework").CheckboxProperty<false>;
|
|
8
|
+
maxLength: import("@taskmagic/pieces-framework").NumberProperty<false>;
|
|
9
|
+
useCache: import("@taskmagic/pieces-framework").CheckboxProperty<false>;
|
|
10
|
+
waitForModel: import("@taskmagic/pieces-framework").CheckboxProperty<false>;
|
|
11
|
+
}>;
|