Upload folder using huggingface_hub
Browse files
6.19.0/dataset/Dataset.svelte
CHANGED
|
@@ -9,7 +9,7 @@
|
|
| 9 |
import MountExample from "./MountExample.svelte";
|
| 10 |
|
| 11 |
interface Props {
|
| 12 |
-
components: string[];
|
| 13 |
component_props: Record<string, any>[];
|
| 14 |
load_component: load_component_type;
|
| 15 |
headers: string[];
|
|
@@ -245,7 +245,7 @@
|
|
| 245 |
onmouseleave={() => handle_mouseleave()}
|
| 246 |
>
|
| 247 |
{#each sample_row as { value, component, runtime }, j (j)}
|
| 248 |
-
{@const component_name = components[j]}
|
| 249 |
|
| 250 |
{#if component_name !== undefined}
|
| 251 |
<td
|
|
|
|
| 9 |
import MountExample from "./MountExample.svelte";
|
| 10 |
|
| 11 |
interface Props {
|
| 12 |
+
components: { name: string; class_id: string }[];
|
| 13 |
component_props: Record<string, any>[];
|
| 14 |
load_component: load_component_type;
|
| 15 |
headers: string[];
|
|
|
|
| 245 |
onmouseleave={() => handle_mouseleave()}
|
| 246 |
>
|
| 247 |
{#each sample_row as { value, component, runtime }, j (j)}
|
| 248 |
+
{@const component_name = components[j]?.name}
|
| 249 |
|
| 250 |
{#if component_name !== undefined}
|
| 251 |
<td
|
6.19.0/dataset/Index.svelte
CHANGED
|
@@ -48,13 +48,13 @@
|
|
| 48 |
|
| 49 |
<Dataset
|
| 50 |
onclick={(d) => (
|
| 51 |
-
(gradio.props.value = d.index),
|
| 52 |
-
gradio.dispatch("click"
|
| 53 |
)}
|
| 54 |
onselect={(data) => gradio.dispatch("select", data)}
|
| 55 |
load_component={gradio.shared.load_component}
|
| 56 |
-
{samples}
|
| 57 |
{...gradio.props}
|
|
|
|
| 58 |
/>
|
| 59 |
</Block>
|
| 60 |
|
|
|
|
| 48 |
|
| 49 |
<Dataset
|
| 50 |
onclick={(d) => (
|
| 51 |
+
(gradio.props.value = Array.isArray(d.index) ? d.index[0] : d.index),
|
| 52 |
+
gradio.dispatch("click")
|
| 53 |
)}
|
| 54 |
onselect={(data) => gradio.dispatch("select", data)}
|
| 55 |
load_component={gradio.shared.load_component}
|
|
|
|
| 56 |
{...gradio.props}
|
| 57 |
+
{samples}
|
| 58 |
/>
|
| 59 |
</Block>
|
| 60 |
|
6.19.0/dataset/MountExample.svelte
CHANGED
|
@@ -8,7 +8,7 @@
|
|
| 8 |
}
|
| 9 |
|
| 10 |
let { component, runtime, ...rest }: Props = $props();
|
| 11 |
-
let el: HTMLElement = $state(null);
|
| 12 |
|
| 13 |
$effect(() => {
|
| 14 |
if (!el || !component) return;
|
|
|
|
| 8 |
}
|
| 9 |
|
| 10 |
let { component, runtime, ...rest }: Props = $props();
|
| 11 |
+
let el: HTMLElement | null = $state(null);
|
| 12 |
|
| 13 |
$effect(() => {
|
| 14 |
if (!el || !component) return;
|
6.19.0/dataset/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
| 1 |
{
|
| 2 |
"name": "@gradio/dataset",
|
| 3 |
-
"version": "0.
|
| 4 |
"description": "Gradio UI packages",
|
| 5 |
"type": "module",
|
| 6 |
"author": "",
|
|
|
|
| 1 |
{
|
| 2 |
"name": "@gradio/dataset",
|
| 3 |
+
"version": "0.7.0",
|
| 4 |
"description": "Gradio UI packages",
|
| 5 |
"type": "module",
|
| 6 |
"author": "",
|
6.19.0/dataset/types.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
| 1 |
import type { SelectData } from "@gradio/utils";
|
| 2 |
|
| 3 |
export interface DatasetProps {
|
| 4 |
-
components: string[];
|
| 5 |
component_props: Record<string, any>[];
|
| 6 |
headers: string[];
|
| 7 |
samples: any[][] | null;
|
|
|
|
| 1 |
import type { SelectData } from "@gradio/utils";
|
| 2 |
|
| 3 |
export interface DatasetProps {
|
| 4 |
+
components: { name: string; class_id: string }[];
|
| 5 |
component_props: Record<string, any>[];
|
| 6 |
headers: string[];
|
| 7 |
samples: any[][] | null;
|