Skip to content
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
1 change: 1 addition & 0 deletions packages/hub/src/types/public.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ export type Task =
| "text-to-image"
| "image-to-text"
| "image-to-image"
| "image-to-video"
| "unconditional-image-generation"
| "video-classification"
| "reinforcement-learning"
Expand Down
1 change: 1 addition & 0 deletions packages/tasks/src/const.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ export const TASKS_MODEL_LIBRARIES: Record<PipelineType, ModelLibraryKey[]> = {
"image-segmentation": ["transformers", "transformers.js"],
"image-to-image": [],
"image-to-text": ["transformers.js"],
"image-to-video": ["diffusers"],
"video-classification": [],
"mask-generation": ["transformers"],
"multiple-choice": ["transformers"],
Expand Down
5 changes: 5 additions & 0 deletions packages/tasks/src/pipelines.ts
Original file line number Diff line number Diff line change
Expand Up @@ -438,6 +438,11 @@ export const PIPELINE_DATA = {
modality: "cv",
color: "indigo",
},
"image-to-video": {
name: "Image-to-Video",
modality: "multimodal",
color: "indigo",
},
"unconditional-image-generation": {
name: "Unconditional Image Generation",
modality: "cv",
Expand Down
1 change: 1 addition & 0 deletions packages/tasks/src/tasksData.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ export const TASKS_DATA: Record<PipelineType, TaskData | undefined> = {
"image-segmentation": getData("image-segmentation", imageSegmentation),
"image-to-image": getData("image-to-image", imageToImage),
"image-to-text": getData("image-to-text", imageToText),
"image-to-video": undefined,
Copy link
Member

Choose a reason for hiding this comment

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

Just a question to help me understand how it works, would creating an entry in tasks/data and populating it here would be enough to have the task listed in https://huggingface.co/tasks ?

Copy link
Member

Choose a reason for hiding this comment

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

That's it, yes

for now the sync between this repo and the hub is'nt active (needs https://github.com/huggingface/moon-landing/pull/8158 + a follow-up PR)

but once it's active yes (there will be some stuff like publishing/updating packages but it can be automated by tooling)

Copy link
Member

Choose a reason for hiding this comment

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

Awesome, thanks!

"mask-generation": getData("mask-generation", placeholder),
"multiple-choice": undefined,
"object-detection": getData("object-detection", objectDetection),
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<script lang="ts">
export let classNames = "";
</script>

<svg xmlns="http://www.w3.org/2000/svg" class={classNames} width="1em" height="1em" fill="none"><path fill="currentColor" fill-rule="evenodd" d="M1.43 1.2h6.63a.7.7 0 0 1 .7.7v4.44a.79.79 0 0 0-.34-.08h-.36V1.9H1.43v3.55l.9-.9a.7.7 0 0 1 .99 0l1.74 1.74a.79.79 0 0 0-.51.47L2.82 5.04l-1.4 1.4v2.09H4.5v.7H1.43a.7.7 0 0 1-.7-.7V1.9a.7.7 0 0 1 .7-.7ZM6.8 5.94l.32.32H5.5l.32-.32a.7.7 0 0 1 .99 0ZM6.2 4.52a1.05 1.05 0 1 1-1.17-1.75A1.05 1.05 0 0 1 6.2 4.52Zm-.4-1.16a.35.35 0 1 0-.38.58.35.35 0 0 0 .39-.58Zm3.9 5.16 1.57-1.26v3.14L9.7 9.15V10a.79.79 0 0 1-.79.79H5.77a.79.79 0 0 1-.79-.79V7.65a.79.79 0 0 1 .79-.78H8.9a.79.79 0 0 1 .79.78v.87Zm-3.93-.87v2.36H8.9V7.65H5.77Z" clip-rule="evenodd"/></svg>
Copy link
Collaborator Author

@mishig25 mishig25 Nov 22, 2023

Choose a reason for hiding this comment

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

@coyotte508 I think the formatter from #297 is not configured properly?
Shouldn't it be multline like

<svg
class={classNames}
xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink"
aria-hidden="true"
fill="currentColor"
focusable="false"
role="img"
width="1em"
height="1em"
preserveAspectRatio="xMidYMid meet"
viewBox="0 0 32 32"
>
<path
d="M29.537 13.76l-3.297-3.297a1.586 1.586 0 0 0-2.24 0L10 24.467V30h5.533l14.004-14a1.586 1.586 0 0 0 0-2.24zM14.704 28H12v-2.704l9.44-9.441l2.705 2.704zM25.56 17.145l-2.704-2.704l2.267-2.267l2.704 2.704z"
fill="currentColor"
/><path d="M11 17h2v-7h3V8H8v2h3v7z" fill="currentColor" /><path
d="M8 20H4V4h16v4h2V4a2 2 0 0 0-2-2H4a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h4z"
fill="currentColor"
/>
</svg>
?

Copy link
Member

Choose a reason for hiding this comment

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

hm yes maybe there's an issue with svelte files

Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
import IconTextGeneration from "../Icons/IconTextGeneration.svelte";
import IconTextToImage from "../Icons/IconTextToImage.svelte";
import IconImageToText from "../Icons/IconImageToText.svelte";
import IconImageToVideo from "../Icons/IconImageToVideo.svelte";
import IconTextToSpeech from "../Icons/IconTextToSpeech.svelte";
import IconTextToVideo from "../Icons/IconTextToVideo.svelte";
import IconTokenClassification from "../Icons/IconTokenClassification.svelte";
Expand Down Expand Up @@ -74,6 +75,7 @@
"text-to-image": IconTextToImage,
"image-to-text": IconImageToText,
"image-to-image": IconImageToImage,
"image-to-video": IconImageToVideo,
"unconditional-image-generation": IconUnconditionalImageGeneration,
"reinforcement-learning": IconReinforcementLearning,
robotics: IconRobotics,
Expand Down