machineuser commited on
Commit
62d2745
1 Parent(s): 0a75df8

Sync widgets demo

Browse files
packages/tasks/src/pipelines.ts CHANGED
@@ -635,6 +635,16 @@ export const PIPELINE_DATA = {
635
  modality: "cv",
636
  color: "yellow",
637
  },
 
 
 
 
 
 
 
 
 
 
638
  other: {
639
  name: "Other",
640
  modality: "other",
 
635
  modality: "cv",
636
  color: "yellow",
637
  },
638
+ "text-to-3d": {
639
+ name: "Text-to-3D",
640
+ modality: "multimodal",
641
+ color: "yellow",
642
+ },
643
+ "image-to-3d": {
644
+ name: "Image-to-3D",
645
+ modality: "multimodal",
646
+ color: "green",
647
+ },
648
  other: {
649
  name: "Other",
650
  modality: "other",
packages/tasks/src/tasks/index.ts CHANGED
@@ -94,6 +94,8 @@ export const TASKS_MODEL_LIBRARIES: Record<PipelineType, ModelLibraryKey[]> = {
94
  "zero-shot-classification": ["transformers", "transformers.js"],
95
  "zero-shot-image-classification": ["transformers", "transformers.js"],
96
  "zero-shot-object-detection": ["transformers", "transformers.js"],
 
 
97
  };
98
 
99
  /**
@@ -161,6 +163,8 @@ export const TASKS_DATA: Record<PipelineType, TaskData | undefined> = {
161
  "zero-shot-classification": getData("zero-shot-classification", zeroShotClassification),
162
  "zero-shot-image-classification": getData("zero-shot-image-classification", zeroShotImageClassification),
163
  "zero-shot-object-detection": getData("zero-shot-object-detection", placeholder),
 
 
164
  } as const;
165
 
166
  export interface ExampleRepo {
 
94
  "zero-shot-classification": ["transformers", "transformers.js"],
95
  "zero-shot-image-classification": ["transformers", "transformers.js"],
96
  "zero-shot-object-detection": ["transformers", "transformers.js"],
97
+ "text-to-3d": [],
98
+ "image-to-3d": [],
99
  };
100
 
101
  /**
 
163
  "zero-shot-classification": getData("zero-shot-classification", zeroShotClassification),
164
  "zero-shot-image-classification": getData("zero-shot-image-classification", zeroShotImageClassification),
165
  "zero-shot-object-detection": getData("zero-shot-object-detection", placeholder),
166
+ "text-to-3d": getData("text-to-3d", placeholder),
167
+ "image-to-3d": getData("image-to-3d", placeholder),
168
  } as const;
169
 
170
  export interface ExampleRepo {
packages/widgets/src/lib/components/Icons/IconImageTo3D.svelte ADDED
@@ -0,0 +1,26 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <script lang="ts">
2
+ export let classNames = "";
3
+ </script>
4
+
5
+ <svg
6
+ class={classNames}
7
+ xmlns="http://www.w3.org/2000/svg"
8
+ xmlns:xlink="http://www.w3.org/1999/xlink"
9
+ aria-hidden="true"
10
+ fill="currentColor"
11
+ focusable="false"
12
+ role="img"
13
+ width="1em"
14
+ height="1em"
15
+ preserveAspectRatio="xMidYMid meet"
16
+ viewBox="0 0 32 32"
17
+ >
18
+ <path d="M11 2H2v9h2V4h7V2z" fill="currentColor" />
19
+ <path d="M2 21v9h9v-2H4v-7H2z" fill="currentColor" />
20
+ <path d="M30 11V2h-9v2h7v7h2z" fill="currentColor" />
21
+ <path d="M21 30h9v-9h-2v7h-7v2z" fill="currentColor" />
22
+ <path
23
+ d="M25.49 10.13l-9-5a1 1 0 0 0-1 0l-9 5A1 1 0 0 0 6 11v10a1 1 0 0 0 .51.87l9 5a1 1 0 0 0 1 0l9-5A1 1 0 0 0 26 21V11a1 1 0 0 0-.51-.87zM16 7.14L22.94 11L16 14.86L9.06 11zM8 12.7l7 3.89v7.71l-7-3.89zm9 11.6v-7.71l7-3.89v7.71z"
24
+ fill="currentColor"
25
+ />
26
+ </svg>
packages/widgets/src/lib/components/Icons/IconTextTo3D.svelte ADDED
@@ -0,0 +1,23 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <script lang="ts">
2
+ export let classNames = "";
3
+ </script>
4
+
5
+ <svg
6
+ class={classNames}
7
+ xmlns="http://www.w3.org/2000/svg"
8
+ xmlns:xlink="http://www.w3.org/1999/xlink"
9
+ aria-hidden="true"
10
+ fill="currentColor"
11
+ focusable="false"
12
+ role="img"
13
+ width="1em"
14
+ height="1em"
15
+ preserveAspectRatio="xMidYMid meet"
16
+ viewBox="0 0 32 32"
17
+ >
18
+ <path
19
+ d="M21.49 13.115l-9-5a1 1 0 0 0-1 0l-9 5A1.008 1.008 0 0 0 2 14v9.995a1 1 0 0 0 .52.87l9 5A1.004 1.004 0 0 0 12 30a1.056 1.056 0 0 0 .49-.135l9-5A.992.992 0 0 0 22 24V14a1.008 1.008 0 0 0-.51-.885zM11 27.295l-7-3.89v-7.72l7 3.89zm1-9.45L5.06 14L12 10.135l6.94 3.86zm8 5.56l-7 3.89v-7.72l7-3.89z"
20
+ fill="currentColor"
21
+ />
22
+ <path d="M30 6h-4V2h-2v4h-4v2h4v4h2V8h4V6z" fill="currentColor" />
23
+ </svg>
packages/widgets/src/lib/components/PipelineIcon/PipelineIcon.svelte CHANGED
@@ -38,6 +38,8 @@
38
  import IconGraphML from "../Icons/IconGraphML.svelte";
39
  import IconZeroShotObjectDetection from "../Icons/IconZeroShotClassification.svelte";
40
  import IconMaskGeneration from "../Icons/IconMaskGeneration.svelte";
 
 
41
  import type { PipelineType } from "@huggingface/tasks";
42
 
43
  export let classNames = "";
@@ -86,6 +88,8 @@
86
  "document-question-answering": IconDocumentQuestionAnswering,
87
  "mask-generation": IconMaskGeneration,
88
  "zero-shot-object-detection": IconZeroShotObjectDetection,
 
 
89
  };
90
 
91
  $: iconComponent =
 
38
  import IconGraphML from "../Icons/IconGraphML.svelte";
39
  import IconZeroShotObjectDetection from "../Icons/IconZeroShotClassification.svelte";
40
  import IconMaskGeneration from "../Icons/IconMaskGeneration.svelte";
41
+ import IconTextTo3D from "../Icons/IconTextTo3D.svelte";
42
+ import IconImageTo3D from "../Icons/IconImageTo3D.svelte";
43
  import type { PipelineType } from "@huggingface/tasks";
44
 
45
  export let classNames = "";
 
88
  "document-question-answering": IconDocumentQuestionAnswering,
89
  "mask-generation": IconMaskGeneration,
90
  "zero-shot-object-detection": IconZeroShotObjectDetection,
91
+ "text-to-3d": IconTextTo3D,
92
+ "image-to-3d": IconImageTo3D,
93
  };
94
 
95
  $: iconComponent =