Skip to content

Commit 7b48942

Browse files
danieldkWauplin
andauthored
Add kernels model library (#1822)
Co-authored-by: Lucain <[email protected]>
1 parent a7cfae4 commit 7b48942

File tree

2 files changed

+16
-0
lines changed

2 files changed

+16
-0
lines changed

packages/tasks/src/model-libraries-snippets.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -813,6 +813,14 @@ export const keras_hub = (model: ModelData): string[] => {
813813
return snippets;
814814
};
815815

816+
export const kernels = (model: ModelData): string[] => [
817+
`# !pip install kernels
818+
819+
from kernels import get_kernel
820+
821+
kernel = get_kernel("${model.id}")`,
822+
];
823+
816824
export const kimi_audio = (model: ModelData): string[] => [
817825
`# Example usage for KimiAudio
818826
# pip install git+https://github.com/MoonshotAI/Kimi-Audio.git

packages/tasks/src/model-libraries.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -563,6 +563,14 @@ export const MODEL_LIBRARIES_UI_ELEMENTS = {
563563
snippets: snippets.keras_hub,
564564
filter: true,
565565
},
566+
kernels: {
567+
prettyLabel: "Kernels",
568+
repoName: "Kernels",
569+
repoUrl: "https://github.com/huggingface/kernels",
570+
docsUrl: "https://huggingface.co/docs/kernels",
571+
snippets: snippets.kernels,
572+
countDownloads: `path_filename:"_ops" AND path_extension:"py"`,
573+
},
566574
"kimi-audio": {
567575
prettyLabel: "KimiAudio",
568576
repoName: "KimiAudio",

0 commit comments

Comments
 (0)