Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions packages/tasks/src/model-libraries-snippets.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,20 @@ export const asteroid = (model: ModelData): string[] => [
model = BaseModel.from_pretrained("${model.id}")`,
];

export const hailo = (model: ModelData): string[] => [
`# Requires hailort + the hailo_platform Python wheel from
# https://hailo.ai/developer-zone/ (Hailo-8 / Hailo-15 targets).
from huggingface_hub import hf_hub_download
from hailo_platform import HEF, VDevice

hef_path = hf_hub_download("${model.id}", "model.hef") # set to the actual HEF filename
hef = HEF(hef_path)

with VDevice() as target:
infer_model = target.create_infer_model(hef_path)
# See https://github.com/hailo-ai/hailort for the full inference API.`,
];

export const audioseal = (model: ModelData): string[] => {
const watermarkSnippet = `# Watermark Generator
from audioseal import AudioSeal
Expand Down
8 changes: 8 additions & 0 deletions packages/tasks/src/model-libraries.ts
Original file line number Diff line number Diff line change
Expand Up @@ -587,6 +587,14 @@ export const MODEL_LIBRARIES_UI_ELEMENTS = {
filter: false,
countDownloads: `path_extension:"safetensors"`,
},
hailo: {
prettyLabel: "Hailo",
repoName: "hailort",
repoUrl: "https://github.com/hailo-ai/hailort",
countDownloads: `path_extension:"hef"`,
snippets: snippets.hailo,
filter: false,
},
hallo: {
prettyLabel: "Hallo",
repoName: "Hallo",
Expand Down