@huggingface/tasks 0.13.16 → 0.13.17
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/model-data.d.ts +3 -0
- package/dist/commonjs/model-data.d.ts.map +1 -1
- package/dist/commonjs/model-libraries-snippets.d.ts +3 -1
- package/dist/commonjs/model-libraries-snippets.d.ts.map +1 -1
- package/dist/commonjs/model-libraries-snippets.js +134 -22
- package/dist/commonjs/model-libraries.d.ts +12 -8
- package/dist/commonjs/model-libraries.d.ts.map +1 -1
- package/dist/commonjs/model-libraries.js +15 -8
- package/dist/esm/model-data.d.ts +3 -0
- package/dist/esm/model-data.d.ts.map +1 -1
- package/dist/esm/model-libraries-snippets.d.ts +3 -1
- package/dist/esm/model-libraries-snippets.d.ts.map +1 -1
- package/dist/esm/model-libraries-snippets.js +129 -19
- package/dist/esm/model-libraries.d.ts +12 -8
- package/dist/esm/model-libraries.d.ts.map +1 -1
- package/dist/esm/model-libraries.js +15 -8
- package/package.json +1 -1
- package/src/model-data.ts +3 -0
- package/src/model-libraries-snippets.ts +141 -19
- package/src/model-libraries.ts +15 -8
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"model-data.d.ts","sourceRoot":"","sources":["../../src/model-data.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AACnD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACzD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAE3D;;GAEG;AACH,MAAM,WAAW,SAAS;IACzB;;OAEG;IACH,EAAE,EAAE,MAAM,CAAC;IACX;;;OAGG;IACH,SAAS,EAAE,MAAM,CAAC;IAClB;;OAEG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB;;OAEG;IACH,MAAM,CAAC,EAAE;QACR,aAAa,CAAC,EAAE,MAAM,EAAE,CAAC;Q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,gBAAgB,CAAC,EAAE,gBAAgB,CAAC;IACpC;;OAEG;IACH,YAAY,CAAC,EAAE,YAAY,GAAG,SAAS,CAAC;IACxC;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAChC;;;;;OAKG;IACH,UAAU,CAAC,EAAE,aAAa,EAAE,GAAG,SAAS,CAAC;IACzC;;;;;;;;;OASG;IACH,QAAQ,CAAC,EAAE;QACV,SAAS,CAAC,EACP,OAAO,GACP;YACA,UAAU,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;SACpC,CAAC;QACL,UAAU,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC;QAC/B,eAAe,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;KAChC,CAAC;IACF;;;OAGG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,WAAW,CAAC,EAAE;QACb,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;QACnC,KAAK,EAAE,MAAM,CAAC;QACd,OAAO,EAAE,OAAO,CAAC;KACjB,CAAC;IACF,IAAI,CAAC,EAAE;QACN,KAAK,EAAE,MAAM,CAAC;QACd,YAAY,CAAC,EAAE,MAAM,CAAC;QACtB,cAAc,CAAC,EAAE,MAAM,CAAC;KACxB,CAAC;CACF;AAED;;GAEG;AACH,MAAM,WAAW,gBAAgB;IAChC;;OAEG;IACH,UAAU,EAAE,MAAM,CAAC;IACnB;;OAEG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB;;OAEG;IACH,YAAY,CAAC,EAAE,YAAY,CAAC;IAC5B;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;CACnB"}
|
|
@@ -5,8 +5,10 @@ export declare const asteroid: (model: ModelData) => string[];
|
|
|
5
5
|
export declare const audioseal: (model: ModelData) => string[];
|
|
6
6
|
export declare const bertopic: (model: ModelData) => string[];
|
|
7
7
|
export declare const bm25s: (model: ModelData) => string[];
|
|
8
|
+
export declare const cxr_foundation: (model: ModelData) => string[];
|
|
8
9
|
export declare const depth_anything_v2: (model: ModelData) => string[];
|
|
9
10
|
export declare const depth_pro: (model: ModelData) => string[];
|
|
11
|
+
export declare const derm_foundation: (model: ModelData) => string[];
|
|
10
12
|
export declare const diffusers: (model: ModelData) => string[];
|
|
11
13
|
export declare const diffusionkit: (model: ModelData) => string[];
|
|
12
14
|
export declare const cartesia_pytorch: (model: ModelData) => string[];
|
|
@@ -20,7 +22,6 @@ export declare const flair: (model: ModelData) => string[];
|
|
|
20
22
|
export declare const gliner: (model: ModelData) => string[];
|
|
21
23
|
export declare const htrflow: (model: ModelData) => string[];
|
|
22
24
|
export declare const keras: (model: ModelData) => string[];
|
|
23
|
-
export declare const keras_nlp: (model: ModelData) => string[];
|
|
24
25
|
export declare const keras_hub: (model: ModelData) => string[];
|
|
25
26
|
export declare const llama_cpp_python: (model: ModelData) => string[];
|
|
26
27
|
export declare const tf_keras: (model: ModelData) => string[];
|
|
@@ -47,6 +48,7 @@ export declare const spacy: (model: ModelData) => string[];
|
|
|
47
48
|
export declare const span_marker: (model: ModelData) => string[];
|
|
48
49
|
export declare const stanza: (model: ModelData) => string[];
|
|
49
50
|
export declare const speechbrain: (model: ModelData) => string[];
|
|
51
|
+
export declare const terratorch: (model: ModelData) => string[];
|
|
50
52
|
export declare const transformers: (model: ModelData) => string[];
|
|
51
53
|
export declare const transformersJS: (model: ModelData) => string[];
|
|
52
54
|
export declare const peft: (model: ModelData) => string[];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"model-libraries-snippets.d.ts","sourceRoot":"","sources":["../../src/model-libraries-snippets.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAkBjD,eAAO,MAAM,QAAQ,UAAW,SAAS,KAAG,MAAM,EAKjD,CAAC;AAkBF,eAAO,MAAM,QAAQ,UAAW,SAAS,KAAG,MAAM,EAKj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EAYnC,CAAC;AAEF,eAAO,MAAM,cAAc,UAAW,SAAS,KAAG,MAAM,EAKvD,CAAC;AAEF,eAAO,MAAM,KAAK,UAAW,SAAS,KAAG,MAAM,EAI9C,CAAC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
4
|
-
exports.hezar = exports.threedtopia_xl = exports.whisperkit = exports.audiocraft = exports.anemoi = exports.pythae = exports.pxia = exports.nemo = exports.model2vec = exports.mlxim = exports.mlx = exports.birefnet = exports.ultralytics = exports.chattts = exports.voicecraft = exports.vfimamba = exports.sana = exports.sentis = exports.mlAgents = exports.stableBaselines3 = exports.fasttext = exports.peft = void 0;
|
|
3
|
+
exports.terratorch = exports.speechbrain = exports.stanza = exports.span_marker = exports.spacy = exports.setfit = exports.sentenceTransformers = exports.sampleFactory = exports.sam2 = exports.fastai = exports.stable_audio_tools = exports.sklearn = exports.seed_story = exports.saelens = exports.timm = exports.tensorflowtts = exports.relik = exports.pyannote_audio = exports.pyannote_audio_pipeline = exports.paddlenlp = exports.open_clip = exports.mesh_anything = exports.mars5_tts = exports.mamba_ssm = exports.tf_keras = exports.llama_cpp_python = exports.keras_hub = exports.keras = exports.htrflow = exports.gliner = exports.flair = exports.fairseq = exports.espnet = exports.espnetASR = exports.espnetTTS = exports.edsnlp = exports.cartesia_mlx = exports.cartesia_pytorch = exports.diffusionkit = exports.diffusers = exports.derm_foundation = exports.depth_pro = exports.depth_anything_v2 = exports.cxr_foundation = exports.bm25s = exports.bertopic = exports.audioseal = exports.asteroid = exports.allennlp = exports.adapters = void 0;
|
|
4
|
+
exports.hezar = exports.threedtopia_xl = exports.whisperkit = exports.audiocraft = exports.anemoi = exports.pythae = exports.pxia = exports.nemo = exports.model2vec = exports.mlxim = exports.mlx = exports.birefnet = exports.ultralytics = exports.chattts = exports.voicecraft = exports.vfimamba = exports.sana = exports.sentis = exports.mlAgents = exports.stableBaselines3 = exports.fasttext = exports.peft = exports.transformersJS = exports.transformers = void 0;
|
|
5
5
|
const library_to_tasks_js_1 = require("./library-to-tasks.js");
|
|
6
6
|
const inputs_js_1 = require("./snippets/inputs.js");
|
|
7
7
|
const common_js_1 = require("./snippets/common.js");
|
|
@@ -86,6 +86,29 @@ const bm25s = (model) => [
|
|
|
86
86
|
retriever = BM25HF.load_from_hub("${model.id}")`,
|
|
87
87
|
];
|
|
88
88
|
exports.bm25s = bm25s;
|
|
89
|
+
const cxr_foundation = (model) => [
|
|
90
|
+
`!git clone https://github.com/Google-Health/cxr-foundation.git
|
|
91
|
+
import tensorflow as tf, sys, requests
|
|
92
|
+
sys.path.append('cxr-foundation/python/')
|
|
93
|
+
|
|
94
|
+
# Install dependencies
|
|
95
|
+
major_version = tf.__version__.rsplit(".", 1)[0]
|
|
96
|
+
!pip install tensorflow-text=={major_version} pypng && pip install --no-deps pydicom hcls_imaging_ml_toolkit retrying
|
|
97
|
+
|
|
98
|
+
# Load image (Stillwaterising, CC0, via Wikimedia Commons)
|
|
99
|
+
from PIL import Image
|
|
100
|
+
from io import BytesIO
|
|
101
|
+
image_url = "https://upload.wikimedia.org/wikipedia/commons/c/c8/Chest_Xray_PA_3-8-2010.png"
|
|
102
|
+
response = requests.get(image_url, headers={'User-Agent': 'Demo'}, stream=True)
|
|
103
|
+
response.raw.decode_content = True # Ensure correct decoding
|
|
104
|
+
img = Image.open(BytesIO(response.content)).convert('L') # Convert to grayscale
|
|
105
|
+
|
|
106
|
+
# Run inference
|
|
107
|
+
from clientside.clients import make_hugging_face_client
|
|
108
|
+
cxr_client = make_hugging_face_client('cxr_model')
|
|
109
|
+
print(cxr_client.get_image_embeddings_from_images([img]))`,
|
|
110
|
+
];
|
|
111
|
+
exports.cxr_foundation = cxr_foundation;
|
|
89
112
|
const depth_anything_v2 = (model) => {
|
|
90
113
|
let encoder;
|
|
91
114
|
let features;
|
|
@@ -156,6 +179,28 @@ focallength_px = prediction["focallength_px"]`;
|
|
|
156
179
|
return [installSnippet, inferenceSnippet];
|
|
157
180
|
};
|
|
158
181
|
exports.depth_pro = depth_pro;
|
|
182
|
+
const derm_foundation = (model) => [
|
|
183
|
+
`from huggingface_hub import from_pretrained_keras
|
|
184
|
+
import tensorflow as tf, requests
|
|
185
|
+
|
|
186
|
+
# Load and format input
|
|
187
|
+
IMAGE_URL = "https://storage.googleapis.com/dx-scin-public-data/dataset/images/3445096909671059178.png"
|
|
188
|
+
input_tensor = tf.train.Example(
|
|
189
|
+
features=tf.train.Features(
|
|
190
|
+
feature={
|
|
191
|
+
"image/encoded": tf.train.Feature(
|
|
192
|
+
bytes_list=tf.train.BytesList(value=[requests.get(IMAGE_URL, stream=True).content])
|
|
193
|
+
)
|
|
194
|
+
}
|
|
195
|
+
)
|
|
196
|
+
).SerializeToString()
|
|
197
|
+
|
|
198
|
+
# Load model and run inference
|
|
199
|
+
loaded_model = from_pretrained_keras("google/derm-foundation")
|
|
200
|
+
infer = loaded_model.signatures["serving_default"]
|
|
201
|
+
print(infer(inputs=tf.constant([input_tensor])))`,
|
|
202
|
+
];
|
|
203
|
+
exports.derm_foundation = derm_foundation;
|
|
159
204
|
const diffusersDefaultPrompt = "Astronaut in a jungle, cold color palette, muted colors, detailed, 8k";
|
|
160
205
|
const diffusers_default = (model) => [
|
|
161
206
|
`from diffusers import DiffusionPipeline
|
|
@@ -376,32 +421,93 @@ model = keras.saving.load_model("hf://${model.id}")
|
|
|
376
421
|
`,
|
|
377
422
|
];
|
|
378
423
|
exports.keras = keras;
|
|
379
|
-
const
|
|
380
|
-
|
|
381
|
-
import os
|
|
382
|
-
os.environ["KERAS_BACKEND"] = "jax"
|
|
424
|
+
const _keras_hub_causal_lm = (modelId) => `
|
|
425
|
+
import keras_hub
|
|
383
426
|
|
|
384
|
-
|
|
427
|
+
# Load CausalLM model (optional: use half precision for inference)
|
|
428
|
+
causal_lm = keras_hub.models.CausalLM.from_preset(${modelId}, dtype="bfloat16")
|
|
429
|
+
causal_lm.compile(sampler="greedy") # (optional) specify a sampler
|
|
385
430
|
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
const keras_hub = (model) => [
|
|
392
|
-
`# Available backend options are: "jax", "torch", "tensorflow".
|
|
393
|
-
import os
|
|
394
|
-
os.environ["KERAS_BACKEND"] = "jax"
|
|
431
|
+
# Generate text
|
|
432
|
+
causal_lm.generate("Keras: deep learning for", max_length=64)
|
|
433
|
+
`;
|
|
434
|
+
const _keras_hub_text_to_image = (modelId) => `
|
|
435
|
+
import keras_hub
|
|
395
436
|
|
|
437
|
+
# Load TextToImage model (optional: use half precision for inference)
|
|
438
|
+
text_to_image = keras_hub.models.TextToImage.from_preset(${modelId}, dtype="bfloat16")
|
|
439
|
+
|
|
440
|
+
# Generate images with a TextToImage model.
|
|
441
|
+
text_to_image.generate("Astronaut in a jungle")
|
|
442
|
+
`;
|
|
443
|
+
const _keras_hub_text_classifier = (modelId) => `
|
|
396
444
|
import keras_hub
|
|
397
445
|
|
|
398
|
-
# Load
|
|
399
|
-
|
|
446
|
+
# Load TextClassifier model
|
|
447
|
+
text_classifier = keras_hub.models.TextClassifier.from_preset(
|
|
448
|
+
${modelId},
|
|
449
|
+
num_classes=2,
|
|
450
|
+
)
|
|
451
|
+
# Fine-tune
|
|
452
|
+
text_classifier.fit(x=["Thilling adventure!", "Total snoozefest."], y=[1, 0])
|
|
453
|
+
# Classify text
|
|
454
|
+
text_classifier.predict(["Not my cup of tea."])
|
|
455
|
+
`;
|
|
456
|
+
const _keras_hub_image_classifier = (modelId) => `
|
|
457
|
+
import keras_hub
|
|
458
|
+
import keras
|
|
400
459
|
|
|
401
|
-
#
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
460
|
+
# Load ImageClassifier model
|
|
461
|
+
image_classifier = keras_hub.models.ImageClassifier.from_preset(
|
|
462
|
+
${modelId},
|
|
463
|
+
num_classes=2,
|
|
464
|
+
)
|
|
465
|
+
# Fine-tune
|
|
466
|
+
image_classifier.fit(
|
|
467
|
+
x=keras.random.randint((32, 64, 64, 3), 0, 256),
|
|
468
|
+
y=keras.random.randint((32, 1), 0, 2),
|
|
469
|
+
)
|
|
470
|
+
# Classify image
|
|
471
|
+
image_classifier.predict(keras.random.randint((1, 64, 64, 3), 0, 256))
|
|
472
|
+
`;
|
|
473
|
+
const _keras_hub_tasks_with_example = {
|
|
474
|
+
CausalLM: _keras_hub_causal_lm,
|
|
475
|
+
TextToImage: _keras_hub_text_to_image,
|
|
476
|
+
TextClassifier: _keras_hub_text_classifier,
|
|
477
|
+
ImageClassifier: _keras_hub_image_classifier,
|
|
478
|
+
};
|
|
479
|
+
const _keras_hub_task_without_example = (task, modelId) => `
|
|
480
|
+
import keras_hub
|
|
481
|
+
|
|
482
|
+
# Create a ${task} model
|
|
483
|
+
task = keras_hub.models.${task}.from_preset(${modelId})
|
|
484
|
+
`;
|
|
485
|
+
const _keras_hub_generic_backbone = (modelId) => `
|
|
486
|
+
import keras_hub
|
|
487
|
+
|
|
488
|
+
# Create a Backbone model unspecialized for any task
|
|
489
|
+
backbone = keras_hub.models.Backbone.from_preset(${modelId})
|
|
490
|
+
`;
|
|
491
|
+
const keras_hub = (model) => {
|
|
492
|
+
const modelId = model.id;
|
|
493
|
+
const tasks = model.config?.keras_hub?.tasks ?? [];
|
|
494
|
+
const snippets = [];
|
|
495
|
+
// First, generate tasks with examples
|
|
496
|
+
for (const [task, snippet] of Object.entries(_keras_hub_tasks_with_example)) {
|
|
497
|
+
if (tasks.includes(task)) {
|
|
498
|
+
snippets.push(snippet(modelId));
|
|
499
|
+
}
|
|
500
|
+
}
|
|
501
|
+
// Then, add remaining tasks
|
|
502
|
+
for (const task in tasks) {
|
|
503
|
+
if (!Object.keys(_keras_hub_tasks_with_example).includes(task)) {
|
|
504
|
+
snippets.push(_keras_hub_task_without_example(task, modelId));
|
|
505
|
+
}
|
|
506
|
+
}
|
|
507
|
+
// Finally, add generic backbone snippet
|
|
508
|
+
snippets.push(_keras_hub_generic_backbone(modelId));
|
|
509
|
+
return snippets;
|
|
510
|
+
};
|
|
405
511
|
exports.keras_hub = keras_hub;
|
|
406
512
|
const llama_cpp_python = (model) => {
|
|
407
513
|
const snippets = [
|
|
@@ -817,6 +923,12 @@ model.${speechbrainMethod}("file.wav")`,
|
|
|
817
923
|
];
|
|
818
924
|
};
|
|
819
925
|
exports.speechbrain = speechbrain;
|
|
926
|
+
const terratorch = (model) => [
|
|
927
|
+
`from terratorch.registry import BACKBONE_REGISTRY
|
|
928
|
+
|
|
929
|
+
model = BACKBONE_REGISTRY.build("${model.id}")`,
|
|
930
|
+
];
|
|
931
|
+
exports.terratorch = terratorch;
|
|
820
932
|
const transformers = (model) => {
|
|
821
933
|
const info = model.transformersInfo;
|
|
822
934
|
if (!info) {
|
|
@@ -172,6 +172,7 @@ export declare const MODEL_LIBRARIES_UI_ELEMENTS: {
|
|
|
172
172
|
prettyLabel: string;
|
|
173
173
|
repoName: string;
|
|
174
174
|
repoUrl: string;
|
|
175
|
+
snippets: (model: ModelData) => string[];
|
|
175
176
|
filter: false;
|
|
176
177
|
countDownloads: string;
|
|
177
178
|
};
|
|
@@ -202,6 +203,7 @@ export declare const MODEL_LIBRARIES_UI_ELEMENTS: {
|
|
|
202
203
|
prettyLabel: string;
|
|
203
204
|
repoName: string;
|
|
204
205
|
repoUrl: string;
|
|
206
|
+
snippets: (model: ModelData) => string[];
|
|
205
207
|
filter: false;
|
|
206
208
|
countDownloads: string;
|
|
207
209
|
};
|
|
@@ -398,13 +400,6 @@ export declare const MODEL_LIBRARIES_UI_ELEMENTS: {
|
|
|
398
400
|
snippets: (model: ModelData) => string[];
|
|
399
401
|
countDownloads: string;
|
|
400
402
|
};
|
|
401
|
-
"keras-nlp": {
|
|
402
|
-
prettyLabel: string;
|
|
403
|
-
repoName: string;
|
|
404
|
-
repoUrl: string;
|
|
405
|
-
docsUrl: string;
|
|
406
|
-
snippets: (model: ModelData) => string[];
|
|
407
|
-
};
|
|
408
403
|
"keras-hub": {
|
|
409
404
|
prettyLabel: string;
|
|
410
405
|
repoName: string;
|
|
@@ -774,6 +769,15 @@ export declare const MODEL_LIBRARIES_UI_ELEMENTS: {
|
|
|
774
769
|
repoName: string;
|
|
775
770
|
repoUrl: string;
|
|
776
771
|
};
|
|
772
|
+
terratorch: {
|
|
773
|
+
prettyLabel: string;
|
|
774
|
+
repoName: string;
|
|
775
|
+
repoUrl: string;
|
|
776
|
+
docsUrl: string;
|
|
777
|
+
filter: false;
|
|
778
|
+
countDownloads: string;
|
|
779
|
+
snippets: (model: ModelData) => string[];
|
|
780
|
+
};
|
|
777
781
|
"tic-clip": {
|
|
778
782
|
prettyLabel: string;
|
|
779
783
|
repoName: string;
|
|
@@ -884,5 +888,5 @@ export declare const MODEL_LIBRARIES_UI_ELEMENTS: {
|
|
|
884
888
|
};
|
|
885
889
|
export type ModelLibraryKey = keyof typeof MODEL_LIBRARIES_UI_ELEMENTS;
|
|
886
890
|
export declare const ALL_MODEL_LIBRARY_KEYS: ModelLibraryKey[];
|
|
887
|
-
export declare const ALL_DISPLAY_MODEL_LIBRARY_KEYS: ("adapter-transformers" | "allennlp" | "anemoi" | "asteroid" | "audiocraft" | "audioseal" | "bertopic" | "big_vision" | "birder" | "birefnet" | "bm25s" | "champ" | "chat_tts" | "colpali" | "cosmos" | "cxr-foundation" | "deepforest" | "depth-anything-v2" | "depth-pro" | "derm-foundation" | "diffree" | "diffusers" | "diffusionkit" | "doctr" | "cartesia_pytorch" | "cartesia_mlx" | "clipscope" | "cosyvoice" | "cotracker" | "edsnlp" | "elm" | "espnet" | "fairseq" | "fastai" | "fasttext" | "flair" | "gemma.cpp" | "gliner" | "glyph-byt5" | "grok" | "hallo" | "hezar" | "htrflow" | "hunyuan-dit" | "imstoucan" | "keras" | "tf-keras" | "keras-
|
|
891
|
+
export declare const ALL_DISPLAY_MODEL_LIBRARY_KEYS: ("adapter-transformers" | "allennlp" | "anemoi" | "asteroid" | "audiocraft" | "audioseal" | "bertopic" | "big_vision" | "birder" | "birefnet" | "bm25s" | "champ" | "chat_tts" | "colpali" | "cosmos" | "cxr-foundation" | "deepforest" | "depth-anything-v2" | "depth-pro" | "derm-foundation" | "diffree" | "diffusers" | "diffusionkit" | "doctr" | "cartesia_pytorch" | "cartesia_mlx" | "clipscope" | "cosyvoice" | "cotracker" | "edsnlp" | "elm" | "espnet" | "fairseq" | "fastai" | "fasttext" | "flair" | "gemma.cpp" | "gliner" | "glyph-byt5" | "grok" | "hallo" | "hezar" | "htrflow" | "hunyuan-dit" | "imstoucan" | "keras" | "tf-keras" | "keras-hub" | "k2" | "liveportrait" | "llama-cpp-python" | "mini-omni2" | "mindspore" | "mamba-ssm" | "mars5-tts" | "mesh-anything" | "mitie" | "ml-agents" | "mlx" | "mlx-image" | "mlc-llm" | "model2vec" | "moshi" | "nemo" | "open-oasis" | "open_clip" | "paddlenlp" | "peft" | "pxia" | "pyannote-audio" | "py-feat" | "pythae" | "recurrentgemma" | "relik" | "refiners" | "reverb" | "saelens" | "sam2" | "sample-factory" | "sapiens" | "sentence-transformers" | "setfit" | "sklearn" | "spacy" | "span-marker" | "speechbrain" | "ssr-speech" | "stable-audio-tools" | "diffusion-single-file" | "seed-story" | "soloaudio" | "stable-baselines3" | "stanza" | "f5-tts" | "genmo" | "tensorflowtts" | "tabpfn" | "terratorch" | "tic-clip" | "timesfm" | "timm" | "transformers" | "transformers.js" | "trellis" | "ultralytics" | "unity-sentis" | "sana" | "vfi-mamba" | "voicecraft" | "whisperkit" | "yolov10" | "3dtopia-xl")[];
|
|
888
892
|
//# sourceMappingURL=model-libraries.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"model-libraries.d.ts","sourceRoot":"","sources":["../../src/model-libraries.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AACjD,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,gCAA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/cxr-foundation",
|
|
161
|
+
snippets: snippets.cxr_foundation,
|
|
161
162
|
filter: false,
|
|
162
163
|
countDownloads: `path:"precomputed_embeddings/embeddings.npz" OR path:"pax-elixr-b-text/saved_model.pb"`,
|
|
163
164
|
},
|
|
@@ -188,6 +189,7 @@ exports.MODEL_LIBRARIES_UI_ELEMENTS = {
|
|
|
188
189
|
prettyLabel: "Derm Foundation",
|
|
189
190
|
repoName: "derm-foundation",
|
|
190
191
|
repoUrl: "https://github.com/google-health/derm-foundation",
|
|
192
|
+
snippets: snippets.derm_foundation,
|
|
191
193
|
filter: false,
|
|
192
194
|
countDownloads: `path:"scin_dataset_precomputed_embeddings.npz" OR path:"saved_model.pb"`,
|
|
193
195
|
},
|
|
@@ -386,13 +388,6 @@ exports.MODEL_LIBRARIES_UI_ELEMENTS = {
|
|
|
386
388
|
snippets: snippets.tf_keras,
|
|
387
389
|
countDownloads: `path:"saved_model.pb"`,
|
|
388
390
|
},
|
|
389
|
-
"keras-nlp": {
|
|
390
|
-
prettyLabel: "KerasNLP",
|
|
391
|
-
repoName: "KerasNLP",
|
|
392
|
-
repoUrl: "https://github.com/keras-team/keras-nlp",
|
|
393
|
-
docsUrl: "https://keras.io/keras_nlp/",
|
|
394
|
-
snippets: snippets.keras_nlp,
|
|
395
|
-
},
|
|
396
391
|
"keras-hub": {
|
|
397
392
|
prettyLabel: "KerasHub",
|
|
398
393
|
repoName: "KerasHub",
|
|
@@ -526,7 +521,10 @@ exports.MODEL_LIBRARIES_UI_ELEMENTS = {
|
|
|
526
521
|
repoUrl: "https://github.com/mlfoundations/open_clip",
|
|
527
522
|
snippets: snippets.open_clip,
|
|
528
523
|
filter: true,
|
|
529
|
-
countDownloads: `
|
|
524
|
+
countDownloads: `path:"open_clip_model.safetensors"
|
|
525
|
+
OR path:"model.safetensors"
|
|
526
|
+
OR path:"open_clip_pytorch_model.bin"
|
|
527
|
+
OR path:"pytorch_model.bin"`,
|
|
530
528
|
},
|
|
531
529
|
paddlenlp: {
|
|
532
530
|
prettyLabel: "paddlenlp",
|
|
@@ -762,6 +760,15 @@ exports.MODEL_LIBRARIES_UI_ELEMENTS = {
|
|
|
762
760
|
repoName: "TabPFN",
|
|
763
761
|
repoUrl: "https://github.com/PriorLabs/TabPFN",
|
|
764
762
|
},
|
|
763
|
+
terratorch: {
|
|
764
|
+
prettyLabel: "TerraTorch",
|
|
765
|
+
repoName: "TerraTorch",
|
|
766
|
+
repoUrl: "https://github.com/IBM/terratorch",
|
|
767
|
+
docsUrl: "https://ibm.github.io/terratorch/",
|
|
768
|
+
filter: false,
|
|
769
|
+
countDownloads: `path_extension:"pt"`,
|
|
770
|
+
snippets: snippets.terratorch,
|
|
771
|
+
},
|
|
765
772
|
"tic-clip": {
|
|
766
773
|
prettyLabel: "TiC-CLIP",
|
|
767
774
|
repoName: "TiC-CLIP",
|
package/dist/esm/model-data.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"model-data.d.ts","sourceRoot":"","sources":["../../src/model-data.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AACnD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACzD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAE3D;;GAEG;AACH,MAAM,WAAW,SAAS;IACzB;;OAEG;IACH,EAAE,EAAE,MAAM,CAAC;IACX;;;OAGG;IACH,SAAS,EAAE,MAAM,CAAC;IAClB;;OAEG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB;;OAEG;IACH,MAAM,CAAC,EAAE;QACR,aAAa,CAAC,EAAE,MAAM,EAAE,CAAC;QACzB;;WAEG;QACH,QAAQ,CAAC,EAAE;YACV;;eAEG;YACH,CAAC,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;SACpB,CAAC;QACF,UAAU,CAAC,EAAE,MAAM,CAAC;QACpB,mBAAmB,CAA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C;;;;;OAKG;IACH,UAAU,CAAC,EAAE,aAAa,EAAE,GAAG,SAAS,CAAC;IACzC;;;;;;;;;OASG;IACH,QAAQ,CAAC,EAAE;QACV,SAAS,CAAC,EACP,OAAO,GACP;YACA,UAAU,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;SACpC,CAAC;QACL,UAAU,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC;QAC/B,eAAe,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;KAChC,CAAC;IACF;;;OAGG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,WAAW,CAAC,EAAE;QACb,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;QACnC,KAAK,EAAE,MAAM,CAAC;QACd,OAAO,EAAE,OAAO,CAAC;KACjB,CAAC;IACF,IAAI,CAAC,EAAE;QACN,KAAK,EAAE,MAAM,CAAC;QACd,YAAY,CAAC,EAAE,MAAM,CAAC;QACtB,cAAc,CAAC,EAAE,MAAM,CAAC;KACxB,CAAC;CACF;AAED;;GAEG;AACH,MAAM,WAAW,gBAAgB;IAChC;;OAEG;IACH,UAAU,EAAE,MAAM,CAAC;IACnB;;OAEG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB;;OAEG;IACH,YAAY,CAAC,EAAE,YAAY,CAAC;IAC5B;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;CACnB"}
|
|
@@ -5,8 +5,10 @@ export declare const asteroid: (model: ModelData) => string[];
|
|
|
5
5
|
export declare const audioseal: (model: ModelData) => string[];
|
|
6
6
|
export declare const bertopic: (model: ModelData) => string[];
|
|
7
7
|
export declare const bm25s: (model: ModelData) => string[];
|
|
8
|
+
export declare const cxr_foundation: (model: ModelData) => string[];
|
|
8
9
|
export declare const depth_anything_v2: (model: ModelData) => string[];
|
|
9
10
|
export declare const depth_pro: (model: ModelData) => string[];
|
|
11
|
+
export declare const derm_foundation: (model: ModelData) => string[];
|
|
10
12
|
export declare const diffusers: (model: ModelData) => string[];
|
|
11
13
|
export declare const diffusionkit: (model: ModelData) => string[];
|
|
12
14
|
export declare const cartesia_pytorch: (model: ModelData) => string[];
|
|
@@ -20,7 +22,6 @@ export declare const flair: (model: ModelData) => string[];
|
|
|
20
22
|
export declare const gliner: (model: ModelData) => string[];
|
|
21
23
|
export declare const htrflow: (model: ModelData) => string[];
|
|
22
24
|
export declare const keras: (model: ModelData) => string[];
|
|
23
|
-
export declare const keras_nlp: (model: ModelData) => string[];
|
|
24
25
|
export declare const keras_hub: (model: ModelData) => string[];
|
|
25
26
|
export declare const llama_cpp_python: (model: ModelData) => string[];
|
|
26
27
|
export declare const tf_keras: (model: ModelData) => string[];
|
|
@@ -47,6 +48,7 @@ export declare const spacy: (model: ModelData) => string[];
|
|
|
47
48
|
export declare const span_marker: (model: ModelData) => string[];
|
|
48
49
|
export declare const stanza: (model: ModelData) => string[];
|
|
49
50
|
export declare const speechbrain: (model: ModelData) => string[];
|
|
51
|
+
export declare const terratorch: (model: ModelData) => string[];
|
|
50
52
|
export declare const transformers: (model: ModelData) => string[];
|
|
51
53
|
export declare const transformersJS: (model: ModelData) => string[];
|
|
52
54
|
export declare const peft: (model: ModelData) => string[];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"model-libraries-snippets.d.ts","sourceRoot":"","sources":["../../src/model-libraries-snippets.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAkBjD,eAAO,MAAM,QAAQ,UAAW,SAAS,KAAG,MAAM,EAKjD,CAAC;AAkBF,eAAO,MAAM,QAAQ,UAAW,SAAS,KAAG,MAAM,EAKjD,CAAC;AAEF,eAAO,MAAM,QAAQ,UAAW,SAAS,KAAG,MAAM,EAIjD,CAAC;AAEF,eAAO,MAAM,SAAS,UAAW,SAAS,KAAG,MAAM,EAkBlD,CAAC;AAaF,eAAO,MAAM,QAAQ,U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@ export const bm25s = (model) => [
|
|
|
76
76
|
|
|
77
77
|
retriever = BM25HF.load_from_hub("${model.id}")`,
|
|
78
78
|
];
|
|
79
|
+
export const cxr_foundation = (model) => [
|
|
80
|
+
`!git clone https://github.com/Google-Health/cxr-foundation.git
|
|
81
|
+
import tensorflow as tf, sys, requests
|
|
82
|
+
sys.path.append('cxr-foundation/python/')
|
|
83
|
+
|
|
84
|
+
# Install dependencies
|
|
85
|
+
major_version = tf.__version__.rsplit(".", 1)[0]
|
|
86
|
+
!pip install tensorflow-text=={major_version} pypng && pip install --no-deps pydicom hcls_imaging_ml_toolkit retrying
|
|
87
|
+
|
|
88
|
+
# Load image (Stillwaterising, CC0, via Wikimedia Commons)
|
|
89
|
+
from PIL import Image
|
|
90
|
+
from io import BytesIO
|
|
91
|
+
image_url = "https://upload.wikimedia.org/wikipedia/commons/c/c8/Chest_Xray_PA_3-8-2010.png"
|
|
92
|
+
response = requests.get(image_url, headers={'User-Agent': 'Demo'}, stream=True)
|
|
93
|
+
response.raw.decode_content = True # Ensure correct decoding
|
|
94
|
+
img = Image.open(BytesIO(response.content)).convert('L') # Convert to grayscale
|
|
95
|
+
|
|
96
|
+
# Run inference
|
|
97
|
+
from clientside.clients import make_hugging_face_client
|
|
98
|
+
cxr_client = make_hugging_face_client('cxr_model')
|
|
99
|
+
print(cxr_client.get_image_embeddings_from_images([img]))`,
|
|
100
|
+
];
|
|
79
101
|
export const depth_anything_v2 = (model) => {
|
|
80
102
|
let encoder;
|
|
81
103
|
let features;
|
|
@@ -144,6 +166,27 @@ depth = prediction["depth"]
|
|
|
144
166
|
focallength_px = prediction["focallength_px"]`;
|
|
145
167
|
return [installSnippet, inferenceSnippet];
|
|
146
168
|
};
|
|
169
|
+
export const derm_foundation = (model) => [
|
|
170
|
+
`from huggingface_hub import from_pretrained_keras
|
|
171
|
+
import tensorflow as tf, requests
|
|
172
|
+
|
|
173
|
+
# Load and format input
|
|
174
|
+
IMAGE_URL = "https://storage.googleapis.com/dx-scin-public-data/dataset/images/3445096909671059178.png"
|
|
175
|
+
input_tensor = tf.train.Example(
|
|
176
|
+
features=tf.train.Features(
|
|
177
|
+
feature={
|
|
178
|
+
"image/encoded": tf.train.Feature(
|
|
179
|
+
bytes_list=tf.train.BytesList(value=[requests.get(IMAGE_URL, stream=True).content])
|
|
180
|
+
)
|
|
181
|
+
}
|
|
182
|
+
)
|
|
183
|
+
).SerializeToString()
|
|
184
|
+
|
|
185
|
+
# Load model and run inference
|
|
186
|
+
loaded_model = from_pretrained_keras("google/derm-foundation")
|
|
187
|
+
infer = loaded_model.signatures["serving_default"]
|
|
188
|
+
print(infer(inputs=tf.constant([input_tensor])))`,
|
|
189
|
+
];
|
|
147
190
|
const diffusersDefaultPrompt = "Astronaut in a jungle, cold color palette, muted colors, detailed, 8k";
|
|
148
191
|
const diffusers_default = (model) => [
|
|
149
192
|
`from diffusers import DiffusionPipeline
|
|
@@ -351,31 +394,93 @@ import keras
|
|
|
351
394
|
model = keras.saving.load_model("hf://${model.id}")
|
|
352
395
|
`,
|
|
353
396
|
];
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
import os
|
|
357
|
-
os.environ["KERAS_BACKEND"] = "jax"
|
|
397
|
+
const _keras_hub_causal_lm = (modelId) => `
|
|
398
|
+
import keras_hub
|
|
358
399
|
|
|
359
|
-
|
|
400
|
+
# Load CausalLM model (optional: use half precision for inference)
|
|
401
|
+
causal_lm = keras_hub.models.CausalLM.from_preset(${modelId}, dtype="bfloat16")
|
|
402
|
+
causal_lm.compile(sampler="greedy") # (optional) specify a sampler
|
|
360
403
|
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
`# Available backend options are: "jax", "torch", "tensorflow".
|
|
367
|
-
import os
|
|
368
|
-
os.environ["KERAS_BACKEND"] = "jax"
|
|
404
|
+
# Generate text
|
|
405
|
+
causal_lm.generate("Keras: deep learning for", max_length=64)
|
|
406
|
+
`;
|
|
407
|
+
const _keras_hub_text_to_image = (modelId) => `
|
|
408
|
+
import keras_hub
|
|
369
409
|
|
|
410
|
+
# Load TextToImage model (optional: use half precision for inference)
|
|
411
|
+
text_to_image = keras_hub.models.TextToImage.from_preset(${modelId}, dtype="bfloat16")
|
|
412
|
+
|
|
413
|
+
# Generate images with a TextToImage model.
|
|
414
|
+
text_to_image.generate("Astronaut in a jungle")
|
|
415
|
+
`;
|
|
416
|
+
const _keras_hub_text_classifier = (modelId) => `
|
|
370
417
|
import keras_hub
|
|
371
418
|
|
|
372
|
-
# Load
|
|
373
|
-
|
|
419
|
+
# Load TextClassifier model
|
|
420
|
+
text_classifier = keras_hub.models.TextClassifier.from_preset(
|
|
421
|
+
${modelId},
|
|
422
|
+
num_classes=2,
|
|
423
|
+
)
|
|
424
|
+
# Fine-tune
|
|
425
|
+
text_classifier.fit(x=["Thilling adventure!", "Total snoozefest."], y=[1, 0])
|
|
426
|
+
# Classify text
|
|
427
|
+
text_classifier.predict(["Not my cup of tea."])
|
|
428
|
+
`;
|
|
429
|
+
const _keras_hub_image_classifier = (modelId) => `
|
|
430
|
+
import keras_hub
|
|
431
|
+
import keras
|
|
374
432
|
|
|
375
|
-
#
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
433
|
+
# Load ImageClassifier model
|
|
434
|
+
image_classifier = keras_hub.models.ImageClassifier.from_preset(
|
|
435
|
+
${modelId},
|
|
436
|
+
num_classes=2,
|
|
437
|
+
)
|
|
438
|
+
# Fine-tune
|
|
439
|
+
image_classifier.fit(
|
|
440
|
+
x=keras.random.randint((32, 64, 64, 3), 0, 256),
|
|
441
|
+
y=keras.random.randint((32, 1), 0, 2),
|
|
442
|
+
)
|
|
443
|
+
# Classify image
|
|
444
|
+
image_classifier.predict(keras.random.randint((1, 64, 64, 3), 0, 256))
|
|
445
|
+
`;
|
|
446
|
+
const _keras_hub_tasks_with_example = {
|
|
447
|
+
CausalLM: _keras_hub_causal_lm,
|
|
448
|
+
TextToImage: _keras_hub_text_to_image,
|
|
449
|
+
TextClassifier: _keras_hub_text_classifier,
|
|
450
|
+
ImageClassifier: _keras_hub_image_classifier,
|
|
451
|
+
};
|
|
452
|
+
const _keras_hub_task_without_example = (task, modelId) => `
|
|
453
|
+
import keras_hub
|
|
454
|
+
|
|
455
|
+
# Create a ${task} model
|
|
456
|
+
task = keras_hub.models.${task}.from_preset(${modelId})
|
|
457
|
+
`;
|
|
458
|
+
const _keras_hub_generic_backbone = (modelId) => `
|
|
459
|
+
import keras_hub
|
|
460
|
+
|
|
461
|
+
# Create a Backbone model unspecialized for any task
|
|
462
|
+
backbone = keras_hub.models.Backbone.from_preset(${modelId})
|
|
463
|
+
`;
|
|
464
|
+
export const keras_hub = (model) => {
|
|
465
|
+
const modelId = model.id;
|
|
466
|
+
const tasks = model.config?.keras_hub?.tasks ?? [];
|
|
467
|
+
const snippets = [];
|
|
468
|
+
// First, generate tasks with examples
|
|
469
|
+
for (const [task, snippet] of Object.entries(_keras_hub_tasks_with_example)) {
|
|
470
|
+
if (tasks.includes(task)) {
|
|
471
|
+
snippets.push(snippet(modelId));
|
|
472
|
+
}
|
|
473
|
+
}
|
|
474
|
+
// Then, add remaining tasks
|
|
475
|
+
for (const task in tasks) {
|
|
476
|
+
if (!Object.keys(_keras_hub_tasks_with_example).includes(task)) {
|
|
477
|
+
snippets.push(_keras_hub_task_without_example(task, modelId));
|
|
478
|
+
}
|
|
479
|
+
}
|
|
480
|
+
// Finally, add generic backbone snippet
|
|
481
|
+
snippets.push(_keras_hub_generic_backbone(modelId));
|
|
482
|
+
return snippets;
|
|
483
|
+
};
|
|
379
484
|
export const llama_cpp_python = (model) => {
|
|
380
485
|
const snippets = [
|
|
381
486
|
`from llama_cpp import Llama
|
|
@@ -765,6 +870,11 @@ model = ${speechbrainInterface}.from_hparams(
|
|
|
765
870
|
model.${speechbrainMethod}("file.wav")`,
|
|
766
871
|
];
|
|
767
872
|
};
|
|
873
|
+
export const terratorch = (model) => [
|
|
874
|
+
`from terratorch.registry import BACKBONE_REGISTRY
|
|
875
|
+
|
|
876
|
+
model = BACKBONE_REGISTRY.build("${model.id}")`,
|
|
877
|
+
];
|
|
768
878
|
export const transformers = (model) => {
|
|
769
879
|
const info = model.transformersInfo;
|
|
770
880
|
if (!info) {
|
|
@@ -172,6 +172,7 @@ export declare const MODEL_LIBRARIES_UI_ELEMENTS: {
|
|
|
172
172
|
prettyLabel: string;
|
|
173
173
|
repoName: string;
|
|
174
174
|
repoUrl: string;
|
|
175
|
+
snippets: (model: ModelData) => string[];
|
|
175
176
|
filter: false;
|
|
176
177
|
countDownloads: string;
|
|
177
178
|
};
|
|
@@ -202,6 +203,7 @@ export declare const MODEL_LIBRARIES_UI_ELEMENTS: {
|
|
|
202
203
|
prettyLabel: string;
|
|
203
204
|
repoName: string;
|
|
204
205
|
repoUrl: string;
|
|
206
|
+
snippets: (model: ModelData) => string[];
|
|
205
207
|
filter: false;
|
|
206
208
|
countDownloads: string;
|
|
207
209
|
};
|
|
@@ -398,13 +400,6 @@ export declare const MODEL_LIBRARIES_UI_ELEMENTS: {
|
|
|
398
400
|
snippets: (model: ModelData) => string[];
|
|
399
401
|
countDownloads: string;
|
|
400
402
|
};
|
|
401
|
-
"keras-nlp": {
|
|
402
|
-
prettyLabel: string;
|
|
403
|
-
repoName: string;
|
|
404
|
-
repoUrl: string;
|
|
405
|
-
docsUrl: string;
|
|
406
|
-
snippets: (model: ModelData) => string[];
|
|
407
|
-
};
|
|
408
403
|
"keras-hub": {
|
|
409
404
|
prettyLabel: string;
|
|
410
405
|
repoName: string;
|
|
@@ -774,6 +769,15 @@ export declare const MODEL_LIBRARIES_UI_ELEMENTS: {
|
|
|
774
769
|
repoName: string;
|
|
775
770
|
repoUrl: string;
|
|
776
771
|
};
|
|
772
|
+
terratorch: {
|
|
773
|
+
prettyLabel: string;
|
|
774
|
+
repoName: string;
|
|
775
|
+
repoUrl: string;
|
|
776
|
+
docsUrl: string;
|
|
777
|
+
filter: false;
|
|
778
|
+
countDownloads: string;
|
|
779
|
+
snippets: (model: ModelData) => string[];
|
|
780
|
+
};
|
|
777
781
|
"tic-clip": {
|
|
778
782
|
prettyLabel: string;
|
|
779
783
|
repoName: string;
|
|
@@ -884,5 +888,5 @@ export declare const MODEL_LIBRARIES_UI_ELEMENTS: {
|
|
|
884
888
|
};
|
|
885
889
|
export type ModelLibraryKey = keyof typeof MODEL_LIBRARIES_UI_ELEMENTS;
|
|
886
890
|
export declare const ALL_MODEL_LIBRARY_KEYS: ModelLibraryKey[];
|
|
887
|
-
export declare const ALL_DISPLAY_MODEL_LIBRARY_KEYS: ("adapter-transformers" | "allennlp" | "anemoi" | "asteroid" | "audiocraft" | "audioseal" | "bertopic" | "big_vision" | "birder" | "birefnet" | "bm25s" | "champ" | "chat_tts" | "colpali" | "cosmos" | "cxr-foundation" | "deepforest" | "depth-anything-v2" | "depth-pro" | "derm-foundation" | "diffree" | "diffusers" | "diffusionkit" | "doctr" | "cartesia_pytorch" | "cartesia_mlx" | "clipscope" | "cosyvoice" | "cotracker" | "edsnlp" | "elm" | "espnet" | "fairseq" | "fastai" | "fasttext" | "flair" | "gemma.cpp" | "gliner" | "glyph-byt5" | "grok" | "hallo" | "hezar" | "htrflow" | "hunyuan-dit" | "imstoucan" | "keras" | "tf-keras" | "keras-
|
|
891
|
+
export declare const ALL_DISPLAY_MODEL_LIBRARY_KEYS: ("adapter-transformers" | "allennlp" | "anemoi" | "asteroid" | "audiocraft" | "audioseal" | "bertopic" | "big_vision" | "birder" | "birefnet" | "bm25s" | "champ" | "chat_tts" | "colpali" | "cosmos" | "cxr-foundation" | "deepforest" | "depth-anything-v2" | "depth-pro" | "derm-foundation" | "diffree" | "diffusers" | "diffusionkit" | "doctr" | "cartesia_pytorch" | "cartesia_mlx" | "clipscope" | "cosyvoice" | "cotracker" | "edsnlp" | "elm" | "espnet" | "fairseq" | "fastai" | "fasttext" | "flair" | "gemma.cpp" | "gliner" | "glyph-byt5" | "grok" | "hallo" | "hezar" | "htrflow" | "hunyuan-dit" | "imstoucan" | "keras" | "tf-keras" | "keras-hub" | "k2" | "liveportrait" | "llama-cpp-python" | "mini-omni2" | "mindspore" | "mamba-ssm" | "mars5-tts" | "mesh-anything" | "mitie" | "ml-agents" | "mlx" | "mlx-image" | "mlc-llm" | "model2vec" | "moshi" | "nemo" | "open-oasis" | "open_clip" | "paddlenlp" | "peft" | "pxia" | "pyannote-audio" | "py-feat" | "pythae" | "recurrentgemma" | "relik" | "refiners" | "reverb" | "saelens" | "sam2" | "sample-factory" | "sapiens" | "sentence-transformers" | "setfit" | "sklearn" | "spacy" | "span-marker" | "speechbrain" | "ssr-speech" | "stable-audio-tools" | "diffusion-single-file" | "seed-story" | "soloaudio" | "stable-baselines3" | "stanza" | "f5-tts" | "genmo" | "tensorflowtts" | "tabpfn" | "terratorch" | "tic-clip" | "timesfm" | "timm" | "transformers" | "transformers.js" | "trellis" | "ultralytics" | "unity-sentis" | "sana" | "vfi-mamba" | "voicecraft" | "whisperkit" | "yolov10" | "3dtopia-xl")[];
|
|
888
892
|
//# sourceMappingURL=model-libraries.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"model-libraries.d.ts","sourceRoot":"","sources":["../../src/model-libraries.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AACjD,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,gCAAgC,CAAC;AAEzE;;GAEG;AACH,MAAM,WAAW,gBAAgB;IAChC;;;;OAIG;IACH,WAAW,EAAE,MAAM,CAAC;IACpB;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAC;IACjB;;OAEG;IACH,OAAO,EAAE,MAAM,CAAC;IAChB;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB;;OAEG;IACH,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,SAAS,KAAK,MAAM,EAAE,CAAC;IAC1C;;;;;OAKG;IACH,cAAc,CAA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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAs0BI,CAAC;AAE7C,MAAM,MAAM,eAAe,GAAG,MAAM,OAAO,2BAA2B,CAAC;AAEvE,eAAO,MAAM,sBAAsB,EAA+C,eAAe,EAAE,CAAC;AAEpG,eAAO,MAAM,8BAA8B,0gDAQ1B,CAAC"}
|
|
@@ -132,6 +132,7 @@ export const MODEL_LIBRARIES_UI_ELEMENTS = {
|
|
|
132
132
|
prettyLabel: "CXR Foundation",
|
|
133
133
|
repoName: "cxr-foundation",
|
|
134
134
|
repoUrl: "https://github.com/google-health/cxr-foundation",
|
|
135
|
+
snippets: snippets.cxr_foundation,
|
|
135
136
|
filter: false,
|
|
136
137
|
countDownloads: `path:"precomputed_embeddings/embeddings.npz" OR path:"pax-elixr-b-text/saved_model.pb"`,
|
|
137
138
|
},
|
|
@@ -162,6 +163,7 @@ export const MODEL_LIBRARIES_UI_ELEMENTS = {
|
|
|
162
163
|
prettyLabel: "Derm Foundation",
|
|
163
164
|
repoName: "derm-foundation",
|
|
164
165
|
repoUrl: "https://github.com/google-health/derm-foundation",
|
|
166
|
+
snippets: snippets.derm_foundation,
|
|
165
167
|
filter: false,
|
|
166
168
|
countDownloads: `path:"scin_dataset_precomputed_embeddings.npz" OR path:"saved_model.pb"`,
|
|
167
169
|
},
|
|
@@ -360,13 +362,6 @@ export const MODEL_LIBRARIES_UI_ELEMENTS = {
|
|
|
360
362
|
snippets: snippets.tf_keras,
|
|
361
363
|
countDownloads: `path:"saved_model.pb"`,
|
|
362
364
|
},
|
|
363
|
-
"keras-nlp": {
|
|
364
|
-
prettyLabel: "KerasNLP",
|
|
365
|
-
repoName: "KerasNLP",
|
|
366
|
-
repoUrl: "https://github.com/keras-team/keras-nlp",
|
|
367
|
-
docsUrl: "https://keras.io/keras_nlp/",
|
|
368
|
-
snippets: snippets.keras_nlp,
|
|
369
|
-
},
|
|
370
365
|
"keras-hub": {
|
|
371
366
|
prettyLabel: "KerasHub",
|
|
372
367
|
repoName: "KerasHub",
|
|
@@ -500,7 +495,10 @@ export const MODEL_LIBRARIES_UI_ELEMENTS = {
|
|
|
500
495
|
repoUrl: "https://github.com/mlfoundations/open_clip",
|
|
501
496
|
snippets: snippets.open_clip,
|
|
502
497
|
filter: true,
|
|
503
|
-
countDownloads: `
|
|
498
|
+
countDownloads: `path:"open_clip_model.safetensors"
|
|
499
|
+
OR path:"model.safetensors"
|
|
500
|
+
OR path:"open_clip_pytorch_model.bin"
|
|
501
|
+
OR path:"pytorch_model.bin"`,
|
|
504
502
|
},
|
|
505
503
|
paddlenlp: {
|
|
506
504
|
prettyLabel: "paddlenlp",
|
|
@@ -736,6 +734,15 @@ export const MODEL_LIBRARIES_UI_ELEMENTS = {
|
|
|
736
734
|
repoName: "TabPFN",
|
|
737
735
|
repoUrl: "https://github.com/PriorLabs/TabPFN",
|
|
738
736
|
},
|
|
737
|
+
terratorch: {
|
|
738
|
+
prettyLabel: "TerraTorch",
|
|
739
|
+
repoName: "TerraTorch",
|
|
740
|
+
repoUrl: "https://github.com/IBM/terratorch",
|
|
741
|
+
docsUrl: "https://ibm.github.io/terratorch/",
|
|
742
|
+
filter: false,
|
|
743
|
+
countDownloads: `path_extension:"pt"`,
|
|
744
|
+
snippets: snippets.terratorch,
|
|
745
|
+
},
|
|
739
746
|
"tic-clip": {
|
|
740
747
|
prettyLabel: "TiC-CLIP",
|
|
741
748
|
repoName: "TiC-CLIP",
|
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.13.
|
|
4
|
+
"version": "0.13.17",
|
|
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/model-data.ts
CHANGED
|
@@ -95,6 +95,29 @@ export const bm25s = (model: ModelData): string[] => [
|
|
|
95
95
|
retriever = BM25HF.load_from_hub("${model.id}")`,
|
|
96
96
|
];
|
|
97
97
|
|
|
98
|
+
export const cxr_foundation = (model: ModelData): string[] => [
|
|
99
|
+
`!git clone https://github.com/Google-Health/cxr-foundation.git
|
|
100
|
+
import tensorflow as tf, sys, requests
|
|
101
|
+
sys.path.append('cxr-foundation/python/')
|
|
102
|
+
|
|
103
|
+
# Install dependencies
|
|
104
|
+
major_version = tf.__version__.rsplit(".", 1)[0]
|
|
105
|
+
!pip install tensorflow-text=={major_version} pypng && pip install --no-deps pydicom hcls_imaging_ml_toolkit retrying
|
|
106
|
+
|
|
107
|
+
# Load image (Stillwaterising, CC0, via Wikimedia Commons)
|
|
108
|
+
from PIL import Image
|
|
109
|
+
from io import BytesIO
|
|
110
|
+
image_url = "https://upload.wikimedia.org/wikipedia/commons/c/c8/Chest_Xray_PA_3-8-2010.png"
|
|
111
|
+
response = requests.get(image_url, headers={'User-Agent': 'Demo'}, stream=True)
|
|
112
|
+
response.raw.decode_content = True # Ensure correct decoding
|
|
113
|
+
img = Image.open(BytesIO(response.content)).convert('L') # Convert to grayscale
|
|
114
|
+
|
|
115
|
+
# Run inference
|
|
116
|
+
from clientside.clients import make_hugging_face_client
|
|
117
|
+
cxr_client = make_hugging_face_client('cxr_model')
|
|
118
|
+
print(cxr_client.get_image_embeddings_from_images([img]))`,
|
|
119
|
+
];
|
|
120
|
+
|
|
98
121
|
export const depth_anything_v2 = (model: ModelData): string[] => {
|
|
99
122
|
let encoder: string;
|
|
100
123
|
let features: string;
|
|
@@ -168,6 +191,28 @@ focallength_px = prediction["focallength_px"]`;
|
|
|
168
191
|
return [installSnippet, inferenceSnippet];
|
|
169
192
|
};
|
|
170
193
|
|
|
194
|
+
export const derm_foundation = (model: ModelData): string[] => [
|
|
195
|
+
`from huggingface_hub import from_pretrained_keras
|
|
196
|
+
import tensorflow as tf, requests
|
|
197
|
+
|
|
198
|
+
# Load and format input
|
|
199
|
+
IMAGE_URL = "https://storage.googleapis.com/dx-scin-public-data/dataset/images/3445096909671059178.png"
|
|
200
|
+
input_tensor = tf.train.Example(
|
|
201
|
+
features=tf.train.Features(
|
|
202
|
+
feature={
|
|
203
|
+
"image/encoded": tf.train.Feature(
|
|
204
|
+
bytes_list=tf.train.BytesList(value=[requests.get(IMAGE_URL, stream=True).content])
|
|
205
|
+
)
|
|
206
|
+
}
|
|
207
|
+
)
|
|
208
|
+
).SerializeToString()
|
|
209
|
+
|
|
210
|
+
# Load model and run inference
|
|
211
|
+
loaded_model = from_pretrained_keras("google/derm-foundation")
|
|
212
|
+
infer = loaded_model.signatures["serving_default"]
|
|
213
|
+
print(infer(inputs=tf.constant([input_tensor])))`,
|
|
214
|
+
]
|
|
215
|
+
|
|
171
216
|
const diffusersDefaultPrompt = "Astronaut in a jungle, cold color palette, muted colors, detailed, 8k";
|
|
172
217
|
|
|
173
218
|
const diffusers_default = (model: ModelData) => [
|
|
@@ -394,32 +439,103 @@ model = keras.saving.load_model("hf://${model.id}")
|
|
|
394
439
|
`,
|
|
395
440
|
];
|
|
396
441
|
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
import os
|
|
400
|
-
os.environ["KERAS_BACKEND"] = "jax"
|
|
442
|
+
const _keras_hub_causal_lm = (modelId: string): string => `
|
|
443
|
+
import keras_hub
|
|
401
444
|
|
|
402
|
-
|
|
445
|
+
# Load CausalLM model (optional: use half precision for inference)
|
|
446
|
+
causal_lm = keras_hub.models.CausalLM.from_preset(${modelId}, dtype="bfloat16")
|
|
447
|
+
causal_lm.compile(sampler="greedy") # (optional) specify a sampler
|
|
403
448
|
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
];
|
|
449
|
+
# Generate text
|
|
450
|
+
causal_lm.generate("Keras: deep learning for", max_length=64)
|
|
451
|
+
`;
|
|
408
452
|
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
453
|
+
const _keras_hub_text_to_image = (modelId: string): string => `
|
|
454
|
+
import keras_hub
|
|
455
|
+
|
|
456
|
+
# Load TextToImage model (optional: use half precision for inference)
|
|
457
|
+
text_to_image = keras_hub.models.TextToImage.from_preset(${modelId}, dtype="bfloat16")
|
|
413
458
|
|
|
459
|
+
# Generate images with a TextToImage model.
|
|
460
|
+
text_to_image.generate("Astronaut in a jungle")
|
|
461
|
+
`;
|
|
462
|
+
|
|
463
|
+
const _keras_hub_text_classifier = (modelId: string): string => `
|
|
414
464
|
import keras_hub
|
|
415
465
|
|
|
416
|
-
# Load
|
|
417
|
-
|
|
466
|
+
# Load TextClassifier model
|
|
467
|
+
text_classifier = keras_hub.models.TextClassifier.from_preset(
|
|
468
|
+
${modelId},
|
|
469
|
+
num_classes=2,
|
|
470
|
+
)
|
|
471
|
+
# Fine-tune
|
|
472
|
+
text_classifier.fit(x=["Thilling adventure!", "Total snoozefest."], y=[1, 0])
|
|
473
|
+
# Classify text
|
|
474
|
+
text_classifier.predict(["Not my cup of tea."])
|
|
475
|
+
`;
|
|
418
476
|
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
477
|
+
const _keras_hub_image_classifier = (modelId: string): string => `
|
|
478
|
+
import keras_hub
|
|
479
|
+
import keras
|
|
480
|
+
|
|
481
|
+
# Load ImageClassifier model
|
|
482
|
+
image_classifier = keras_hub.models.ImageClassifier.from_preset(
|
|
483
|
+
${modelId},
|
|
484
|
+
num_classes=2,
|
|
485
|
+
)
|
|
486
|
+
# Fine-tune
|
|
487
|
+
image_classifier.fit(
|
|
488
|
+
x=keras.random.randint((32, 64, 64, 3), 0, 256),
|
|
489
|
+
y=keras.random.randint((32, 1), 0, 2),
|
|
490
|
+
)
|
|
491
|
+
# Classify image
|
|
492
|
+
image_classifier.predict(keras.random.randint((1, 64, 64, 3), 0, 256))
|
|
493
|
+
`;
|
|
494
|
+
|
|
495
|
+
const _keras_hub_tasks_with_example = {
|
|
496
|
+
CausalLM: _keras_hub_causal_lm,
|
|
497
|
+
TextToImage: _keras_hub_text_to_image,
|
|
498
|
+
TextClassifier: _keras_hub_text_classifier,
|
|
499
|
+
ImageClassifier: _keras_hub_image_classifier,
|
|
500
|
+
};
|
|
501
|
+
|
|
502
|
+
const _keras_hub_task_without_example = (task: string, modelId: string): string => `
|
|
503
|
+
import keras_hub
|
|
504
|
+
|
|
505
|
+
# Create a ${task} model
|
|
506
|
+
task = keras_hub.models.${task}.from_preset(${modelId})
|
|
507
|
+
`;
|
|
508
|
+
|
|
509
|
+
const _keras_hub_generic_backbone = (modelId: string): string => `
|
|
510
|
+
import keras_hub
|
|
511
|
+
|
|
512
|
+
# Create a Backbone model unspecialized for any task
|
|
513
|
+
backbone = keras_hub.models.Backbone.from_preset(${modelId})
|
|
514
|
+
`;
|
|
515
|
+
|
|
516
|
+
export const keras_hub = (model: ModelData): string[] => {
|
|
517
|
+
const modelId = model.id;
|
|
518
|
+
const tasks = model.config?.keras_hub?.tasks ?? [];
|
|
519
|
+
|
|
520
|
+
const snippets: string[] = [];
|
|
521
|
+
|
|
522
|
+
// First, generate tasks with examples
|
|
523
|
+
for (const [task, snippet] of Object.entries(_keras_hub_tasks_with_example)) {
|
|
524
|
+
if (tasks.includes(task)) {
|
|
525
|
+
snippets.push(snippet(modelId));
|
|
526
|
+
}
|
|
527
|
+
}
|
|
528
|
+
// Then, add remaining tasks
|
|
529
|
+
for (const task in tasks) {
|
|
530
|
+
if (!Object.keys(_keras_hub_tasks_with_example).includes(task)) {
|
|
531
|
+
snippets.push(_keras_hub_task_without_example(task, modelId));
|
|
532
|
+
}
|
|
533
|
+
}
|
|
534
|
+
// Finally, add generic backbone snippet
|
|
535
|
+
snippets.push(_keras_hub_generic_backbone(modelId));
|
|
536
|
+
|
|
537
|
+
return snippets;
|
|
538
|
+
};
|
|
423
539
|
|
|
424
540
|
export const llama_cpp_python = (model: ModelData): string[] => {
|
|
425
541
|
const snippets = [
|
|
@@ -845,6 +961,12 @@ model.${speechbrainMethod}("file.wav")`,
|
|
|
845
961
|
];
|
|
846
962
|
};
|
|
847
963
|
|
|
964
|
+
export const terratorch = (model: ModelData): string[] => [
|
|
965
|
+
`from terratorch.registry import BACKBONE_REGISTRY
|
|
966
|
+
|
|
967
|
+
model = BACKBONE_REGISTRY.build("${model.id}")`,
|
|
968
|
+
];
|
|
969
|
+
|
|
848
970
|
export const transformers = (model: ModelData): string[] => {
|
|
849
971
|
const info = model.transformersInfo;
|
|
850
972
|
if (!info) {
|
package/src/model-libraries.ts
CHANGED
|
@@ -176,6 +176,7 @@ export const MODEL_LIBRARIES_UI_ELEMENTS = {
|
|
|
176
176
|
prettyLabel: "CXR Foundation",
|
|
177
177
|
repoName: "cxr-foundation",
|
|
178
178
|
repoUrl: "https://github.com/google-health/cxr-foundation",
|
|
179
|
+
snippets: snippets.cxr_foundation,
|
|
179
180
|
filter: false,
|
|
180
181
|
countDownloads: `path:"precomputed_embeddings/embeddings.npz" OR path:"pax-elixr-b-text/saved_model.pb"`,
|
|
181
182
|
},
|
|
@@ -206,6 +207,7 @@ export const MODEL_LIBRARIES_UI_ELEMENTS = {
|
|
|
206
207
|
prettyLabel: "Derm Foundation",
|
|
207
208
|
repoName: "derm-foundation",
|
|
208
209
|
repoUrl: "https://github.com/google-health/derm-foundation",
|
|
210
|
+
snippets: snippets.derm_foundation,
|
|
209
211
|
filter: false,
|
|
210
212
|
countDownloads: `path:"scin_dataset_precomputed_embeddings.npz" OR path:"saved_model.pb"`,
|
|
211
213
|
},
|
|
@@ -404,13 +406,6 @@ export const MODEL_LIBRARIES_UI_ELEMENTS = {
|
|
|
404
406
|
snippets: snippets.tf_keras,
|
|
405
407
|
countDownloads: `path:"saved_model.pb"`,
|
|
406
408
|
},
|
|
407
|
-
"keras-nlp": {
|
|
408
|
-
prettyLabel: "KerasNLP",
|
|
409
|
-
repoName: "KerasNLP",
|
|
410
|
-
repoUrl: "https://github.com/keras-team/keras-nlp",
|
|
411
|
-
docsUrl: "https://keras.io/keras_nlp/",
|
|
412
|
-
snippets: snippets.keras_nlp,
|
|
413
|
-
},
|
|
414
409
|
"keras-hub": {
|
|
415
410
|
prettyLabel: "KerasHub",
|
|
416
411
|
repoName: "KerasHub",
|
|
@@ -544,7 +539,10 @@ export const MODEL_LIBRARIES_UI_ELEMENTS = {
|
|
|
544
539
|
repoUrl: "https://github.com/mlfoundations/open_clip",
|
|
545
540
|
snippets: snippets.open_clip,
|
|
546
541
|
filter: true,
|
|
547
|
-
countDownloads: `
|
|
542
|
+
countDownloads: `path:"open_clip_model.safetensors"
|
|
543
|
+
OR path:"model.safetensors"
|
|
544
|
+
OR path:"open_clip_pytorch_model.bin"
|
|
545
|
+
OR path:"pytorch_model.bin"`,
|
|
548
546
|
},
|
|
549
547
|
paddlenlp: {
|
|
550
548
|
prettyLabel: "paddlenlp",
|
|
@@ -780,6 +778,15 @@ export const MODEL_LIBRARIES_UI_ELEMENTS = {
|
|
|
780
778
|
repoName: "TabPFN",
|
|
781
779
|
repoUrl: "https://github.com/PriorLabs/TabPFN",
|
|
782
780
|
},
|
|
781
|
+
terratorch: {
|
|
782
|
+
prettyLabel: "TerraTorch",
|
|
783
|
+
repoName: "TerraTorch",
|
|
784
|
+
repoUrl: "https://github.com/IBM/terratorch",
|
|
785
|
+
docsUrl: "https://ibm.github.io/terratorch/",
|
|
786
|
+
filter: false,
|
|
787
|
+
countDownloads: `path_extension:"pt"`,
|
|
788
|
+
snippets: snippets.terratorch,
|
|
789
|
+
},
|
|
783
790
|
"tic-clip": {
|
|
784
791
|
prettyLabel: "TiC-CLIP",
|
|
785
792
|
repoName: "TiC-CLIP",
|