Skip to content
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

Add any-to-any as a task to Hub #860

Merged
merged 3 commits into from
Sep 4, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
6 changes: 6 additions & 0 deletions packages/tasks/src/pipelines.ts
Original file line number Diff line number Diff line change
Expand Up @@ -658,6 +658,12 @@ export const PIPELINE_DATA = {
color: "blue",
hideInDatasets: true,
},
"any-to-any": {
name: "Any-to-Any",
modality: "multimodal",
color: "yellow",
hideInDatasets: true,
},
other: {
name: "Other",
modality: "other",
Expand Down
2 changes: 2 additions & 0 deletions packages/tasks/src/tasks/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,7 @@ export const TASKS_MODEL_LIBRARIES: Record<PipelineType, ModelLibraryKey[]> = {
"zero-shot-object-detection": ["transformers", "transformers.js"],
"text-to-3d": ["diffusers"],
"image-to-3d": ["diffusers"],
"any-to-any": ["transformers"],
};

/**
Expand All @@ -195,6 +196,7 @@ function getData(type: PipelineType, partialTaskData: TaskDataCustom = placehold
// Tasks that call getData() without the second argument will
// have a "placeholder" page.
export const TASKS_DATA: Record<PipelineType, TaskData | undefined> = {
"any-to-any": getData("any-to-any", placeholder),
"audio-classification": getData("audio-classification", audioClassification),
"audio-to-audio": getData("audio-to-audio", audioToAudio),
"automatic-speech-recognition": getData("automatic-speech-recognition", automaticSpeechRecognition),
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" viewBox="0 0 32 32" {...$$props}><path fill="currentColor" d="M10 15h12v2H10zM8.7 6.285A3 3 0 0 0 9 5a3 3 0 1 0-3 3a2.96 2.96 0 0 0 1.285-.3L10 10.413V13h2V9.586zM6 6a1 1 0 1 1 1-1a1 1 0 0 1-1 1m13-1a3 3 0 1 0-4 2.815V13h2V7.816A3 3 0 0 0 19 5m-3 1a1 1 0 1 1 1-1a1 1 0 0 1-1 1m10-4a3.003 3.003 0 0 0-3 3a3 3 0 0 0 .3 1.285l-3.3 3.3V13h2v-2.586L24.715 7.7A2.96 2.96 0 0 0 26 8a3 3 0 0 0 0-6m0 4a1 1 0 1 1 1-1a1 1 0 0 1-1 1M12 19h-2v2.586L7.285 24.3A2.96 2.96 0 0 0 6 24a3 3 0 1 0 3 3a3 3 0 0 0-.3-1.285l3.3-3.3zm-6 9a1 1 0 1 1 1-1a1 1 0 0 1-1 1m11-3.816V19h-2v5.184a3 3 0 1 0 2 0M16 28a1 1 0 1 1 1-1a1 1 0 0 1-1 1m10-4a2.96 2.96 0 0 0-1.285.3L22 21.587V19h-2v3.414l3.3 3.3A3 3 0 0 0 23 27a3 3 0 1 0 3-3m0 4a1 1 0 1 1 1-1a1 1 0 0 1-1 1"/></svg>
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@
import IconImageTo3D from "../Icons/IconImageTo3D.svelte";
import IconImageFeatureExtraction from "../Icons/IconImageFeatureExtraction.svelte";
import IconVideoTextToText from "../Icons/IconVideoTextToText.svelte";
import IconAnyToAny from "../Icons/IconAnyToAny.svelte";
import type { WidgetType } from "@huggingface/tasks";

export let classNames = "";
Expand Down Expand Up @@ -96,6 +97,7 @@
"image-to-3d": IconImageTo3D,
"image-feature-extraction": IconImageFeatureExtraction,
"video-text-to-text": IconVideoTextToText,
"any-to-any": IconAnyToAny,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i like the icon!

};

$: iconComponent =
Expand Down
Loading