New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@huggingface/tasks

Package Overview
Dependencies
Maintainers
4
Versions
136
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@huggingface/tasks - npm Package Compare versions

Comparing version 0.10.21 to 0.10.22

3

dist/src/model-libraries-snippets.d.ts

@@ -18,2 +18,4 @@ import type { ModelData } from "./model-data";

export declare const keras_nlp: (model: ModelData) => string[];
export declare const tf_keras: (model: ModelData) => string[];
export declare const mars5_tts: (model: ModelData) => string[];
export declare const open_clip: (model: ModelData) => string[];

@@ -49,2 +51,3 @@ export declare const paddlenlp: (model: ModelData) => string[];

export declare const audiocraft: (model: ModelData) => string[];
export declare const whisperkit: () => string[];
//# sourceMappingURL=model-libraries-snippets.d.ts.map

@@ -89,2 +89,3 @@ import type { ModelData } from "./model-data";

filter: false;
countDownloads: string;
};

@@ -242,2 +243,11 @@ audioseal: {

};
"tf-keras": {
prettyLabel: string;
repoName: string;
repoUrl: string;
docsUrl: string;
snippets: (model: ModelData) => string[];
filter: true;
countDownloads: string;
};
"keras-nlp": {

@@ -260,2 +270,10 @@ prettyLabel: string;

};
"mars5-tts": {
prettyLabel: string;
repoName: string;
repoUrl: string;
filter: false;
countDownloads: string;
snippets: (model: ModelData) => string[];
};
"ml-agents": {

@@ -496,2 +514,4 @@ prettyLabel: string;

repoUrl: string;
docsUrl: string;
snippets: () => string[];
countDownloads: string;

@@ -501,4 +521,4 @@ };

export type ModelLibraryKey = keyof typeof MODEL_LIBRARIES_UI_ELEMENTS;
export declare const ALL_MODEL_LIBRARY_KEYS: ("adapter-transformers" | "allennlp" | "asteroid" | "audiocraft" | "audioseal" | "bertopic" | "big_vision" | "bm25s" | "chat_tts" | "diffusers" | "doctr" | "edsnlp" | "elm" | "espnet" | "fairseq" | "fastai" | "fasttext" | "flair" | "gemma.cpp" | "gliner" | "glyph-byt5" | "grok" | "hunyuan-dit" | "keras" | "keras-nlp" | "k2" | "mindspore" | "ml-agents" | "mlx" | "mlx-image" | "nemo" | "open_clip" | "paddlenlp" | "peft" | "pyannote-audio" | "pythae" | "recurrentgemma" | "sample-factory" | "sentence-transformers" | "setfit" | "sklearn" | "spacy" | "span-marker" | "speechbrain" | "stable-audio-tools" | "diffusion-single-file" | "stable-baselines3" | "stanza" | "tensorflowtts" | "tic-clip" | "timesfm" | "timm" | "transformers" | "transformers.js" | "unity-sentis" | "voicecraft" | "whisperkit")[];
export declare const ALL_DISPLAY_MODEL_LIBRARY_KEYS: ("adapter-transformers" | "allennlp" | "asteroid" | "audiocraft" | "audioseal" | "bertopic" | "big_vision" | "bm25s" | "chat_tts" | "diffusers" | "doctr" | "edsnlp" | "elm" | "espnet" | "fairseq" | "fastai" | "fasttext" | "flair" | "gemma.cpp" | "gliner" | "glyph-byt5" | "grok" | "hunyuan-dit" | "keras" | "keras-nlp" | "k2" | "mindspore" | "ml-agents" | "mlx" | "mlx-image" | "nemo" | "open_clip" | "paddlenlp" | "peft" | "pyannote-audio" | "pythae" | "recurrentgemma" | "sample-factory" | "sentence-transformers" | "setfit" | "sklearn" | "spacy" | "span-marker" | "speechbrain" | "stable-audio-tools" | "diffusion-single-file" | "stable-baselines3" | "stanza" | "tensorflowtts" | "tic-clip" | "timesfm" | "timm" | "transformers" | "transformers.js" | "unity-sentis" | "voicecraft" | "whisperkit")[];
export declare const ALL_MODEL_LIBRARY_KEYS: ("adapter-transformers" | "allennlp" | "asteroid" | "audiocraft" | "audioseal" | "bertopic" | "big_vision" | "bm25s" | "chat_tts" | "diffusers" | "doctr" | "edsnlp" | "elm" | "espnet" | "fairseq" | "fastai" | "fasttext" | "flair" | "gemma.cpp" | "gliner" | "glyph-byt5" | "grok" | "hunyuan-dit" | "keras" | "tf-keras" | "keras-nlp" | "k2" | "mindspore" | "mars5-tts" | "ml-agents" | "mlx" | "mlx-image" | "nemo" | "open_clip" | "paddlenlp" | "peft" | "pyannote-audio" | "pythae" | "recurrentgemma" | "sample-factory" | "sentence-transformers" | "setfit" | "sklearn" | "spacy" | "span-marker" | "speechbrain" | "stable-audio-tools" | "diffusion-single-file" | "stable-baselines3" | "stanza" | "tensorflowtts" | "tic-clip" | "timesfm" | "timm" | "transformers" | "transformers.js" | "unity-sentis" | "voicecraft" | "whisperkit")[];
export declare const ALL_DISPLAY_MODEL_LIBRARY_KEYS: ("adapter-transformers" | "allennlp" | "asteroid" | "audiocraft" | "audioseal" | "bertopic" | "big_vision" | "bm25s" | "chat_tts" | "diffusers" | "doctr" | "edsnlp" | "elm" | "espnet" | "fairseq" | "fastai" | "fasttext" | "flair" | "gemma.cpp" | "gliner" | "glyph-byt5" | "grok" | "hunyuan-dit" | "keras" | "tf-keras" | "keras-nlp" | "k2" | "mindspore" | "mars5-tts" | "ml-agents" | "mlx" | "mlx-image" | "nemo" | "open_clip" | "paddlenlp" | "peft" | "pyannote-audio" | "pythae" | "recurrentgemma" | "sample-factory" | "sentence-transformers" | "setfit" | "sklearn" | "spacy" | "span-marker" | "speechbrain" | "stable-audio-tools" | "diffusion-single-file" | "stable-baselines3" | "stanza" | "tensorflowtts" | "tic-clip" | "timesfm" | "timm" | "transformers" | "transformers.js" | "unity-sentis" | "voicecraft" | "whisperkit")[];
//# sourceMappingURL=model-libraries.d.ts.map

2

package.json
{
"name": "@huggingface/tasks",
"packageManager": "pnpm@8.10.5",
"version": "0.10.21",
"version": "0.10.22",
"description": "List of ML tasks for huggingface.co/tasks",

@@ -6,0 +6,0 @@ "repository": "https://github.com/huggingface/huggingface.js.git",

@@ -195,5 +195,9 @@ import type { ModelData } from "./model-data";

export const keras = (model: ModelData): string[] => [
`from huggingface_hub import from_pretrained_keras
`# Available backend options are: "jax", "tensorflow", "torch".
import os
os.environ["KERAS_BACKEND"] = "tensorflow"
import keras
model = from_pretrained_keras("${model.id}")
model = keras.saving.load_model("hf://${model.id}")
`,

@@ -204,2 +208,3 @@ ];

`# Available backend options are: "jax", "tensorflow", "torch".
import os
os.environ["KERAS_BACKEND"] = "tensorflow"

@@ -214,2 +219,18 @@

export const tf_keras = (model: ModelData): string[] => [
`# Note: 'keras<3.x' or 'tf_keras' must be installed (legacy)
# See https://github.com/keras-team/tf-keras for more details.
from huggingface_hub import from_pretrained_keras
model = from_pretrained_keras("${model.id}")
`,
];
export const mars5_tts = (model: ModelData): string[] => [
`# Install from https://github.com/Camb-ai/MARS5-TTS
from inference import Mars5TTS
mars5 = Mars5TTS.from_pretrained("${model.id}")`,
];
export const open_clip = (model: ModelData): string[] => [

@@ -721,2 +742,16 @@ `import open_clip

};
export const whisperkit = (): string[] => [
`# Install CLI with Homebrew on macOS device
brew install whisperkit-cli
# View all available inference options
whisperkit-cli transcribe --help
# Download and run inference using whisper base model
whisperkit-cli transcribe --audio-path /path/to/audio.mp3
# Or use your preferred model variant
whisperkit-cli transcribe --model "large-v3" --model-prefix "distil" --audio-path /path/to/audio.mp3 --verbose`,
];
//#endregion

@@ -93,2 +93,3 @@ import * as snippets from "./model-libraries-snippets";

filter: false,
countDownloads: `path:"state_dict.bin"`,
},

@@ -245,2 +246,12 @@ audioseal: {

filter: true,
countDownloads: `path:"config.json" OR path_extension:"keras"`,
},
"tf-keras": {
// Legacy "Keras 2" library (tensorflow-only)
prettyLabel: "TF-Keras",
repoName: "TF-Keras",
repoUrl: "https://github.com/keras-team/tf-keras",
docsUrl: "https://huggingface.co/docs/hub/tf-keras",
snippets: snippets.tf_keras,
filter: true,
countDownloads: `path:"saved_model.pb"`,

@@ -265,2 +276,10 @@ },

},
"mars5-tts": {
prettyLabel: "MARS5-TTS",
repoName: "MARS5-TTS",
repoUrl: "https://github.com/Camb-ai/MARS5-TTS",
filter: false,
countDownloads: `path:"mars5_ar.safetensors"`,
snippets: snippets.mars5_tts,
},
"ml-agents": {

@@ -501,2 +520,4 @@ prettyLabel: "ml-agents",

repoUrl: "https://github.com/argmaxinc/WhisperKit",
docsUrl: "https://github.com/argmaxinc/WhisperKit?tab=readme-ov-file#homebrew",
snippets: snippets.whisperkit,
countDownloads: `path_filename:"model" AND path_extension:"mil" AND _exists_:"path_prefix"`,

@@ -503,0 +524,0 @@ },

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc