Skip to content

Add HTRflow as a library #1008

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 15 commits into from
Nov 5, 2024
Merged
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
17 changes: 17 additions & 0 deletions packages/tasks/src/model-libraries-snippets.ts
Original file line number Diff line number Diff line change
Expand Up @@ -363,6 +363,23 @@ export const gliner = (model: ModelData): string[] => [
model = GLiNER.from_pretrained("${model.id}")`,
];

export const htrflow = (model: ModelData): string[] => [
`# CLI usage
# see docs: https://ai-riksarkivet.github.io/htrflow/latest/getting_started/quick_start.html
htrflow pipeline <path/to/pipeline.yaml> <path/to/image>`,
`# Python usage
from htrflow.pipeline.pipeline import Pipeline
from htrflow.pipeline.steps import Task
from htrflow.models.framework.model import ModelClass

pipeline = Pipeline(
[
Task(
ModelClass, {"model": "${model.id}"}, {}
),
])`,
];

export const keras = (model: ModelData): string[] => [
`# Available backend options are: "jax", "torch", "tensorflow".
import os
Expand Down
7 changes: 7 additions & 0 deletions packages/tasks/src/model-libraries.ts
Original file line number Diff line number Diff line change
Expand Up @@ -317,6 +317,13 @@ export const MODEL_LIBRARIES_UI_ELEMENTS = {
docsUrl: "https://hezarai.github.io/hezar",
countDownloads: `path:"model_config.yaml" OR path:"embedding/embedding_config.yaml"`,
},
htrflow: {
prettyLabel: "HTRflow",
repoName: "HTRflow",
repoUrl: "https://github.com/AI-Riksarkivet/htrflow",
docsUrl: "https://ai-riksarkivet.github.io/htrflow",
snippets: snippets.htrflow,
},
"hunyuan-dit": {
prettyLabel: "HunyuanDiT",
repoName: "HunyuanDiT",
Expand Down
Loading