diff --git a/js/_website/src/routes/changelog/+page.svelte b/js/_website/src/routes/changelog/+page.svelte index 63021d9b4a..49ea5baa43 100644 --- a/js/_website/src/routes/changelog/+page.svelte +++ b/js/_website/src/routes/changelog/+page.svelte @@ -54,7 +54,7 @@ {/each} -
+
{@html content}
diff --git a/js/_website/src/routes/docs/[doc=valid_doc]/+page.svelte b/js/_website/src/routes/docs/[doc=valid_doc]/+page.svelte index 4193c4e1a2..1c13c5ad81 100644 --- a/js/_website/src/routes/docs/[doc=valid_doc]/+page.svelte +++ b/js/_website/src/routes/docs/[doc=valid_doc]/+page.svelte @@ -32,7 +32,7 @@ const anchor = document.getElementById(anchorId); window.scrollTo({ top: anchor?.offsetTop, - behavior: "smooth" + behavior: "smooth", }); } @@ -72,453 +72,462 @@
- +
+ -
-
-

- New to Gradio? Start here: Getting Started +

+

-

-

- See the Release History -

-
- -
- {#if obj.prev_obj} - Getting Started +

+

-

- - {obj.prev_obj.replace("-", " ")} -
- - {:else} -
- {/if} - {#if obj.next_obj} - -
- {obj.next_obj.replace("-", " ")} - -
-
- {:else} -
- {/if} -
+ See the Release History +

+
-
-
-
-
-

- {obj.name} - -

-
- - {#if obj.override_signature} -
-
{obj.override_signature}
+
+ {#if obj.prev_obj} + +
+ + {obj.prev_obj.replace("-", " ")}
- {:else} -
-
{obj.parent}.{obj.name}({#each obj.parameters as param}{#if !("kwargs" in param) && !("default" in param) && param.name != "self"}{param.name}, {/if}{/each}···)
-
- {/if} - - {#if mode === "components"} -
- {#key obj.name} - - {/key} -
- {/if} - -
-

- Description - -

-

{@html obj.description}

-
- - {#if mode === "components"} -
-

- Behavior - -

-

- As input: - {@html obj.preprocessing} -

-

- As output: - {@html obj.postprocessing} -

- {#if obj.examples_format} -

- Format expected for examples: - {@html obj.examples_format}} -

- {/if} - {#if obj.events && obj.events.length > 0} -

- Supported events: - {@html obj.events} -

- {/if} -
- {/if} - - {#if obj.example} -
-

- Example Usage - -

-
-
{@html obj.highlighted_example})
-
- {/if} + {/if} - {#if (obj.parameters.length > 0 && obj.parameters[0].name != "self") || obj.parameters.length > 1} -
-

- Initialization - -

- - - - - - - - - {#each obj.parameters as param} - {#if param["name"] != "self"} - - - - - {/if} - {/each} - -
ParameterDescription
- - {param["name"]} - -

- {param["annotation"]} -

- {#if "default" in param} -

- default: {param["default"]} -

- {:else if !("kwargs" in param)} -

- required -

- {/if} -
-

{param["doc"] || ""}

-
-
- {/if} + {#if mode === "components"} +
+ {#key obj.name} + + {/key} +
+ {/if} - {#if mode === "components" && obj.string_shortcuts} -
-

- Shortcuts +
+

+ Description

- - - - - - - - - - {#each obj.string_shortcuts as shortcut} - - - - - - {/each} - -
ClassInterface String ShortcutInitialization
-

- gradio.{shortcut[0]} -

-
-

"{shortcut[1]}"

-
- {shortcut[2]} -
+

{@html obj.description}

- {/if} - {#if obj.demos} -
-
-

- Demos + {#if mode === "components"} +
+

+ Behavior + +

+

+ As input: + {@html obj.preprocessing} +

+

+ As output: + {@html obj.postprocessing} +

+ {#if obj.examples_format} +

+ Format expected for examples: + {@html obj.examples_format}} +

+ {/if} + {#if obj.events && obj.events.length > 0} +

+ Supported events: + {@html obj.events} +

+ {/if} +
+ {/if} + + {#if obj.example} +
+

+ Example Usage

-
-
-
+
{@html obj.highlighted_example}
+
+
+ {/if} + + {#if (obj.parameters.length > 0 && obj.parameters[0].name != "self") || obj.parameters.length > 1} +
+

+ Initialization + +

+ + + + + + + + + {#each obj.parameters as param} + {#if param["name"] != "self"} + + + + + {/if} + {/each} + +
ParameterDescription
+ + {param["name"]} + +

+ {param["annotation"]} +

+ {#if "default" in param} +

+ default: {param["default"]} +

+ {:else if !("kwargs" in param)} +

+ required +

+ {/if} +
+

{param["doc"] || ""}

+
+
+ {/if} + + {#if mode === "components" && obj.string_shortcuts} +
+

+ Shortcuts + +

+ + + + + + + + + + {#each obj.string_shortcuts as shortcut} + + + + + + {/each} + +
ClassInterface String ShortcutInitialization
+

+ gradio.{shortcut[0]} +

+
+

"{shortcut[1]}"

+
+ {shortcut[2]} +
+
+ {/if} + + {#if obj.demos} +
+
+

+ Demos + -
+

+
+
+
+
+ {#each obj.demos as demo, i} + + {/each} +
{#each obj.demos as demo, i} - + +
{/each}
- {#each obj.demos as demo, i} -
- -
- {/each}
-
- {/if} + {/if} - {#if obj.fns && obj.fns.length > 0} -
-

- Methods - -

-
- {#each obj.fns as fn} - - {/each} -
-
-
- {/if} - - {#if obj.guides && obj.guides.length > 0} -
-

- Guides - -

- -
- {#each obj.guides as guide, i} + {#if obj.fns && obj.fns.length > 0} +
+

+ Methods -
-

- {guide.pretty_name} -

-
- - {/each} -

-
- {/if} -
-
- -

+
+ {#each obj.fns as fn} + {/each} - {/if} - {#if obj.guides && obj.guides.length > 0} -
  • +
    +
    +
  • + {/if} + + {#if obj.guides && obj.guides.length > 0} +
    +

    + Guides + +

    + +
    + {#each obj.guides as guide, i} Guides - - {/if} - +
    +

    + {guide.pretty_name} +

    +
    + + {/each} +
    +
    {/if}

    + +
    + {#if obj.prev_obj} + +
    + + {obj.prev_obj.replace("-", " ")} +
    +
    + {:else} +
    + {/if} + {#if obj.next_obj} + +
    + {obj.next_obj.replace("-", " ")} + +
    +
    + {:else} +
    + {/if} +
    -
    - {#if obj.prev_obj} +
    diff --git a/js/_website/src/routes/docs/block-layouts/+page.svelte b/js/_website/src/routes/docs/block-layouts/+page.svelte index 295c22d81d..74a9db58ab 100644 --- a/js/_website/src/routes/docs/block-layouts/+page.svelte +++ b/js/_website/src/routes/docs/block-layouts/+page.svelte @@ -62,421 +62,434 @@
    - +
    + -
    -
    -

    - New to Gradio? Start here: Getting Started +

    +

    -

    -

    - See the Release History -

    -
    + New to Gradio? Start here: Getting Started +

    +

    + See the Release History +

    +
    - + -
    -
    -
    +
    +
    +
    -
    -

    - Block Layouts - +

    -

    -
    + Block Layouts + + +
    -
    -

    - Description - -

    -

    {@html description}

    -
    +
    +

    + Description + +

    +

    {@html description}

    +
    - {#each objs as obj} -
    -
    -

    - {obj.name} - -

    -
    - - {#if obj.override_signature} -
    -
    {obj.override_signature}
    + {#each objs as obj} +
    +
    +

    + {obj.name} + +

    - {:else} -
    -
    {obj.parent}.{obj.name}({#each obj.parameters as param}{#if !("kwargs" in param) && !("default" in param) && param.name != "self"}{param.name}, {/if}{/each}···)
    -
    - {/if} + >) +
    + {/if} - {#if mode === "components"} -
    - {#key obj.name} - - {/key} -
    - {/if} + {#if mode === "components"} +
    + {#key obj.name} + + {/key} +
    + {/if} -

    - Description - -

    -

    {@html obj.description}

    + Description + + +

    {@html obj.description}

    - {#if mode === "components"} -

    - As input: - {@html obj.preprocessing} -

    -

    - As output: - {@html obj.postprocessing} -

    - {#if obj.examples_format} + {#if mode === "components"}

    - Format expected for examples: - {@html obj.examples_format}} + As input: + {@html obj.preprocessing}

    - {/if} - {#if obj.events && obj.events.length > 0} -

    - Supported events: - {@html obj.events} +

    + As output: + {@html obj.postprocessing}

    + {#if obj.examples_format} +

    + Format expected for examples: + {@html obj.examples_format}} +

    + {/if} + {#if obj.events && obj.events.length > 0} +

    + Supported events: + {@html obj.events} +

    + {/if} {/if} - {/if} - {#if obj.example} -

    - Example Usage - -

    -
    -
    {@html obj.highlighted_example}
    -
    - {/if} - - {#if (obj.parameters.length > 0 && obj.parameters[0].name != "self") || obj.parameters.length > 1} -

    - Initialization - -

    - - - - - - - - - {#each obj.parameters as param} - {#if param["name"] != "self"} - - - - - {/if} - {/each} - -
    ParameterDescription
    - - {param["name"]} - -

    - {param["annotation"]} -

    - {#if "default" in param} -

    - default: {param["default"]} -

    - {:else if !("kwargs" in param)} -

    - required -

    - {/if} -
    -

    {param["doc"] || ""}

    -
    - {/if} - - {#if mode === "components" && obj.string_shortcuts} - - - - - - - - - - {#each obj.string_shortcuts as shortcut} - - - - - - {/each} - -
    ClassInterface String ShortcutInitialization
    -

    - gradio.{shortcut[0]} -

    -
    -

    "{shortcut[1]}"

    -
    - {shortcut[2]} -
    - {/if} - - {#if obj.fns && obj.fns.length > 0} -

    Methods

    -
    - {#each obj.fns as fn} - - {/each} -
    -
    - {/if} - - {#if obj.guides && obj.guides.length > 0} -
    -

    - Guides + Example Usage

    - -
    - {#each obj.guides as guide, i} - -
    -

    - {guide.pretty_name} -

    -
    -
    - {/each} +
    +
    {@html obj.highlighted_example}
    -
    - {/if} + {/if} - {#if obj.demos} -
    -
    -

    0 && obj.parameters[0].name != "self") || obj.parameters.length > 1} +

    + Initialization + - ✨ {obj.name} Examples +

    + + + + + + + + + {#each obj.parameters as param} + {#if param["name"] != "self"} + + + + + {/if} + {/each} + +
    ParameterDescription
    + + {param["name"]} + +

    + {param["annotation"]} +

    + {#if "default" in param} +

    + default: {param["default"]} +

    + {:else if !("kwargs" in param)} +

    + required +

    + {/if} +
    +

    {param["doc"] || ""}

    +
    + {/if} + + {#if mode === "components" && obj.string_shortcuts} + + + + + + + + + + {#each obj.string_shortcuts as shortcut} + + + + + + {/each} + +
    ClassInterface String ShortcutInitialization
    +

    + gradio.{shortcut[0]} +

    +
    +

    "{shortcut[1]}"

    +
    + {shortcut[2]} +
    + {/if} + + {#if obj.fns && obj.fns.length > 0} +

    Methods

    +
    + {#each obj.fns as fn} + + {/each} +
    +
    + {/if} + + {#if obj.guides && obj.guides.length > 0} +
    +

    + Guides -

    -
    -
    -
    + +
    + {#each obj.guides as guide, i} + - +
    + {/if} + + {#if obj.demos} +
    +
    +

    + ✨ {obj.name} Examples + +

    +
    +
    +
    +
    + {#each obj.demos as demo, i} + + {/each} +
    {#each obj.demos as demo, i} - + +
    {/each}
    - {#each obj.demos as demo, i} -
    - -
    - {/each}
    -
    - {/if} -
    - {/each} -
    -
    + +
    - -
    - -
    - Blocks -
    -
    - -
    - ChatInterface -
    -
    +
    diff --git a/js/_website/src/routes/docs/combining-interfaces/+page.svelte b/js/_website/src/routes/docs/combining-interfaces/+page.svelte index 5affb87b8f..8ba60e2b38 100644 --- a/js/_website/src/routes/docs/combining-interfaces/+page.svelte +++ b/js/_website/src/routes/docs/combining-interfaces/+page.svelte @@ -27,7 +27,7 @@ const anchor = document.getElementById(anchorId); window.scrollTo({ top: anchor?.offsetTop, - behavior: "smooth" + behavior: "smooth", }); } @@ -61,425 +61,434 @@
    - +
    + -
    -
    -

    - New to Gradio? Start here: Getting Started +

    +

    -

    -

    - See the Release History -

    -
    + New to Gradio? Start here: Getting Started +

    +

    + See the Release History +

    +
    - - -
    -
    -
    -
    -

    - Combining Interfaces - -

    + - {#each objs as obj} -
    +
    +
    +
    -

    - {obj.name} +

    + Combining Interfaces

    +
    +

    + Description + +

    +

    {@html description}

    +
    +
    - {#if obj.override_signature} -
    -
    {obj.override_signature}
    + {#each objs as obj} +
    +
    +

    + {obj.name} + +

    - {:else} -
    -
    {obj.parent}.{obj.name}({#each obj.parameters as param}{#if !("kwargs" in param) && !("default" in param) && param.name != "self"}{param.name}, {/if}{/each}···)
    -
    - {/if} + >) +
    + {/if} - {#if mode === "components"} -
    - {#key obj.name} - - {/key} -
    - {/if} + {#if mode === "components"} +
    + {#key obj.name} + + {/key} +
    + {/if} -

    - Description - -

    -

    {@html obj.description}

    + Description + + +

    {@html obj.description}

    - {#if mode === "components"} -

    - As input: - {@html obj.preprocessing} -

    -

    - As output: - {@html obj.postprocessing} -

    - {#if obj.examples_format} + {#if mode === "components"}

    - Format expected for examples: - {@html obj.examples_format}} + As input: + {@html obj.preprocessing}

    - {/if} - {#if obj.events && obj.events.length > 0} -

    - Supported events: - {@html obj.events} +

    + As output: + {@html obj.postprocessing}

    + {#if obj.examples_format} +

    + Format expected for examples: + {@html obj.examples_format}} +

    + {/if} + {#if obj.events && obj.events.length > 0} +

    + Supported events: + {@html obj.events} +

    + {/if} {/if} - {/if} - {#if obj.example} -

    - Example Usage - -

    -
    -
    {@html obj.highlighted_example}
    -
    - {/if} - - {#if (obj.parameters.length > 0 && obj.parameters[0].name != "self") || obj.parameters.length > 1} -

    - Initialization - -

    - - - - - - - - - {#each obj.parameters as param} - {#if param["name"] != "self"} - - - - - {/if} - {/each} - -
    ParameterDescription
    - - {param["name"]} - -

    - {param["annotation"]} -

    - {#if "default" in param} -

    - default: {param["default"]} -

    - {:else if !("kwargs" in param)} -

    - required -

    - {/if} -
    -

    {param["doc"] || ""}

    -
    - {/if} - - {#if mode === "components" && obj.string_shortcuts} - - - - - - - - - - {#each obj.string_shortcuts as shortcut} - - - - - - {/each} - -
    ClassInterface String ShortcutInitialization
    -

    - gradio.{shortcut[0]} -

    -
    -

    "{shortcut[1]}"

    -
    - {shortcut[2]} -
    - {/if} - - {#if obj.fns && obj.fns.length > 0} -

    Methods

    -
    - {#each obj.fns as fn} - - {/each} -
    -
    - {/if} - - {#if obj.guides && obj.guides.length > 0} -

    - Guides - -

    - -
    - {#each obj.guides as guide, i} - -
    -

    - {guide.pretty_name} -

    -
    -
    - {/each} -
    - {/if} - - {#if obj.demos} -
    + {#if obj.example}

    - Demos + Example Usage

    -
    -
    -
    +
    {@html obj.highlighted_example}
    +
    + {/if} + + {#if (obj.parameters.length > 0 && obj.parameters[0].name != "self") || obj.parameters.length > 1} +

    + Initialization + +

    + + + + + + + + + {#each obj.parameters as param} + {#if param["name"] != "self"} + + + + + {/if} + {/each} + +
    ParameterDescription
    + + {param["name"]} + +

    + {param["annotation"]} +

    + {#if "default" in param} +

    + default: {param["default"]} +

    + {:else if !("kwargs" in param)} +

    + required +

    + {/if} +
    +

    {param["doc"] || ""}

    +
    + {/if} + + {#if mode === "components" && obj.string_shortcuts} + + + + + + + + + + {#each obj.string_shortcuts as shortcut} + + + + + + {/each} + +
    ClassInterface String ShortcutInitialization
    +

    + gradio.{shortcut[0]} +

    +
    +

    "{shortcut[1]}"

    +
    + {shortcut[2]} +
    + {/if} + + {#if obj.fns && obj.fns.length > 0} +

    Methods

    +
    + {#each obj.fns as fn} + + {/each} +
    +
    + {/if} + + {#if obj.guides && obj.guides.length > 0} +

    + Guides + +

    + +
    + {#each obj.guides as guide, i} + - + {/if} + + {#if obj.demos} +
    +

    + Demos + +

    +
    +
    +
    +
    + {#each obj.demos as demo, i} + + {/each} +
    {#each obj.demos as demo, i} - + +
    {/each}
    - {#each obj.demos as demo, i} -
    - -
    - {/each}
    -
    - {/if} -
    - {/each} -
    - -
    +
    -
    - -
    - Flagging -
    -
    - -
    - Blocks -
    -
    +
    diff --git a/js/_website/src/routes/docs/components/+page.svelte b/js/_website/src/routes/docs/components/+page.svelte index 39eb143a9e..5ff5d774b8 100644 --- a/js/_website/src/routes/docs/components/+page.svelte +++ b/js/_website/src/routes/docs/components/+page.svelte @@ -32,7 +32,7 @@

    New to Gradio? Start here: Getting Started

    -
    +
    - +
    + -
    -
    -

    - New to Gradio? Start here: Getting Started +

    +

    -

    -

    - See the Release History -

    -
    - - - -
    -
    -
    -
    -

    - Flagging - -

    -
    - -

    Getting Started - Description - -

    -

    {@html description}

    -
    +

    +

    + See the Release History +

    +
    - {#each objs as obj} -
    + + +
    +
    +
    -

    - {obj.name} +

    + Flagging

    - {#if obj.override_signature} -
    -
    {obj.override_signature}
    +

    + Description + +

    +

    {@html description}

    +
    + + {#each objs as obj} +
    +
    +

    + {obj.name} + +

    - {:else} -
    -
    {obj.parent}.{obj.name}({#each obj.parameters as param}{#if !("kwargs" in param) && !("default" in param) && param.name != "self"}{param.name}, {/if}{/each}···)
    -
    - {/if} + >) +
    + {/if} - {#if mode === "components"} -
    - {#key obj.name} - - {/key} -
    - {/if} + {#if mode === "components"} +
    + {#key obj.name} + + {/key} +
    + {/if} -

    - Description - -

    -

    {@html obj.description}

    + Description + + +

    {@html obj.description}

    - {#if mode === "components"} -

    - As input: - {@html obj.preprocessing} -

    -

    - As output: - {@html obj.postprocessing} -

    - {#if obj.examples_format} + {#if mode === "components"}

    - Format expected for examples: - {@html obj.examples_format}} + As input: + {@html obj.preprocessing}

    - {/if} - {#if obj.events && obj.events.length > 0} -

    - Supported events: - {@html obj.events} +

    + As output: + {@html obj.postprocessing}

    + {#if obj.examples_format} +

    + Format expected for examples: + {@html obj.examples_format}} +

    + {/if} + {#if obj.events && obj.events.length > 0} +

    + Supported events: + {@html obj.events} +

    + {/if} {/if} - {/if} - {#if obj.example} -

    - Example Usage - -

    -
    -
    {@html obj.highlighted_example}
    -
    - {/if} - - {#if (obj.parameters.length > 0 && obj.parameters[0].name != "self") || obj.parameters.length > 1} -

    - Initialization - -

    - - - - - - - - - - {#each obj.parameters as param} - {#if param["name"] != "self"} - - - - - {/if} - {/each} - -
    ParameterDescription
    - - {param["name"]} - -

    - {param["annotation"]} -

    - {#if "default" in param} -

    - default: {param["default"]} -

    - {:else if !("kwargs" in param)} -

    - required -

    - {/if} -
    -

    {param["doc"] || ""}

    -
    - {/if} - - {#if mode === "components" && obj.string_shortcuts} - - - - - - - - - - {#each obj.string_shortcuts as shortcut} - - - - - - {/each} - -
    ClassInterface String ShortcutInitialization
    -

    - gradio.{shortcut[0]} -

    -
    -

    "{shortcut[1]}"

    -
    - {shortcut[2]} -
    - {/if} - - {#if obj.fns && obj.fns.length > 0} -

    Methods

    -
    - {#each obj.fns as fn} - - {/each} -
    -
    - {/if} - - {#if obj.guides && obj.guides.length > 0} -

    - Guides - -

    - -
    - {#each obj.guides as guide, i} - -
    -

    - {guide.pretty_name} -

    -
    -
    - {/each} -
    - {/if} - - {#if obj.demos} -
    + {#if obj.example}

    - Demos + Example Usage

    -
    -
    -
    +
    {@html obj.highlighted_example}
    +
    + {/if} + + {#if (obj.parameters.length > 0 && obj.parameters[0].name != "self") || obj.parameters.length > 1} +

    + Initialization + +

    + + + + + + + + + + {#each obj.parameters as param} + {#if param["name"] != "self"} + + + + + {/if} + {/each} + +
    ParameterDescription
    + + {param["name"]} + +

    + {param["annotation"]} +

    + {#if "default" in param} +

    + default: {param["default"]} +

    + {:else if !("kwargs" in param)} +

    + required +

    + {/if} +
    +

    {param["doc"] || ""}

    +
    + {/if} + + {#if mode === "components" && obj.string_shortcuts} + + + + + + + + + + {#each obj.string_shortcuts as shortcut} + + + + + + {/each} + +
    ClassInterface String ShortcutInitialization
    +

    + gradio.{shortcut[0]} +

    +
    +

    "{shortcut[1]}"

    +
    + {shortcut[2]} +
    + {/if} + + {#if obj.fns && obj.fns.length > 0} +

    Methods

    +
    + {#each obj.fns as fn} + + {/each} +
    +
    + {/if} + + {#if obj.guides && obj.guides.length > 0} +

    + Guides + +

    + +
    + {#each obj.guides as guide, i} + - + {/if} + + {#if obj.demos} +
    +

    + Demos + +

    +
    +
    +
    +
    + {#each obj.demos as demo, i} + + {/each} +
    {#each obj.demos as demo, i} - + +
    {/each}
    - {#each obj.demos as demo, i} -
    - -
    - {/each}
    -
    - {/if} -
    - {/each} + {/if} +
    + {/each} +
    -
    diff --git a/js/_website/src/routes/docs/js-client/+page.svelte b/js/_website/src/routes/docs/js-client/+page.svelte index 68fe9a6004..0cc7998215 100644 --- a/js/_website/src/routes/docs/js-client/+page.svelte +++ b/js/_website/src/routes/docs/js-client/+page.svelte @@ -21,44 +21,46 @@ />
    - +
    + -
    -
    -

    - New to Gradio? Start here: Getting Started +

    +

    -

    -

    - See the Release History -

    -
    + New to Gradio? Start here: Getting Started +

    +

    + See the Release History +

    +
    - -
    -
    -
    - {@html readme_html} + +
    +
    +
    + {@html readme_html} +
    diff --git a/js/_website/src/routes/docs/python-client/+page.svelte b/js/_website/src/routes/docs/python-client/+page.svelte index 19b1b757e2..758d3a0783 100644 --- a/js/_website/src/routes/docs/python-client/+page.svelte +++ b/js/_website/src/routes/docs/python-client/+page.svelte @@ -17,90 +17,94 @@ />
    - +
    + -
    -
    -

    - New to Gradio? Start here: Getting Started +

    +

    -

    -

    - See the Release History -

    -
    - - -
    -
    -
    -

    Getting Started - Python Client -

    +

    +

    + See the Release History +

    +
    -

    - The lightweight Gradio client libraries make it easy to use any - Gradio app as an API. We currently support both a Python client - library as well as a JavaScript client library. -

    - -

    - The Python client library is gradio_client. It's included in the latest versions of the - gradio - package, but for a more lightweight experience, you can install it using - pip - without having to install gradio: -

    - -
    -
    pip install gradio_client
    + +
    +
    +
    +

    + Python Client +

    -

    - The library mainly consists of two primary classes: Client - and Job. Learn more by reading - our guide: - Getting Started with the Python Client -

    +

    + The lightweight Gradio client libraries make it easy to use any + Gradio app as an API. We currently support both a Python client + library as well as a JavaScript client library. +

    + +

    + The Python client library is gradio_client. It's included in the latest versions of the + gradio + package, but for a more lightweight experience, you can install it + using + pip + without having to install + gradio: +

    + +
    +
    pip install gradio_client
    +
    + +

    + The library mainly consists of two primary classes: Client + and Job. Learn more by reading + our guide: + Getting Started with the Python Client +

    +
    diff --git a/js/_website/src/routes/docs/themes/+page.svelte b/js/_website/src/routes/docs/themes/+page.svelte index 51e81c72c3..25f42f75fc 100644 --- a/js/_website/src/routes/docs/themes/+page.svelte +++ b/js/_website/src/routes/docs/themes/+page.svelte @@ -63,88 +63,58 @@
    - +
    + -
    -
    -

    - New to Gradio? Start here: Getting Started +

    +

    -

    -

    - See the Release History -

    -
    - - - -
    -
    -
    -
    -

    - Themes - -

    -
    - -

    Getting Started - Description - -

    -

    - Customize the look of your app by writing your own custom theme -

    -
    +

    +

    + See the Release History +

    +
    - {#each objs as obj} -
    + + +
    +
    +
    -

    - {obj.name} +

    + Themes

    - {#if obj.override_signature} -
    -
    {obj.override_signature}
    +

    + Description + +

    +

    + Customize the look of your app by writing your own custom theme +

    +
    + + {#each objs as obj} +
    +
    +

    + {obj.name} + +

    - {:else} -
    -
    {obj.parent}.{obj.name}({#each obj.parameters as param}{#if !("kwargs" in param) && !("default" in param) && param.name != "self"}{param.name}, {/if}{/each}···)
    -
    - {/if} - - {#if mode === "components"} -
    - {#key obj.name} - - {/key} -
    - {/if} - - {#if obj.description} -

    - Description - -

    -

    {@html obj.description}

    - {/if} - - {#if mode === "components"} -

    - As input: - {@html obj.preprocessing} -

    -

    - As output: - {@html obj.postprocessing} -

    - {#if obj.examples_format} -

    - Format expected for examples: - {@html obj.examples_format}} -

    + >) +
    {/if} - {#if obj.events && obj.events.length > 0} -

    - Supported events: - {@html obj.events} -

    + + {#if mode === "components"} +
    + {#key obj.name} + + {/key} +
    {/if} - {/if} - {#if obj.example} -

    - Example Usage - -

    -
    -
    {@html obj.highlighted_example}
    -
    - {/if} - - {#if (obj.parameters.length > 0 && obj.parameters[0].name != "self") || obj.parameters.length > 1} -

    - Initialization - -

    - - - - - - - - - - {#each obj.parameters as param} - {#if param["name"] != "self"} - - - - - {/if} - {/each} - -
    ParameterDescription
    - - {param["name"]} - -

    - {param["annotation"]} -

    - {#if "default" in param} -

    - default: {param["default"]} -

    - {:else if !("kwargs" in param)} -

    - required -

    - {/if} -
    -

    {param["doc"] || ""}

    -
    - {/if} - - {#if mode === "components" && obj.string_shortcuts} - - - - - - - - - - {#each obj.string_shortcuts as shortcut} - - - - - - {/each} - -
    ClassInterface String ShortcutInitialization
    -

    - gradio.{shortcut[0]} -

    -
    -

    "{shortcut[1]}"

    -
    - {shortcut[2]} -
    - {/if} - - {#if obj.fns && obj.fns.length > 0} -

    - Methods - -

    -

    Methods

    -
    - {#each obj.fns as fn} - - {/each} -
    -
    - {/if} - - {#if obj.guides && obj.guides.length > 0} -

    - Guides - -

    - -
    - {#each obj.guides as guide, i} - -
    -

    - {guide.pretty_name} -

    -
    -
    - {/each} -
    - {/if} - - {#if obj.demos} -
    + {#if obj.description}

    - Demos + Description

    -
    -
    -
    + {@html obj.description} +

    + {/if} + + {#if mode === "components"} +

    + As input: + {@html obj.preprocessing} +

    +

    + As output: + {@html obj.postprocessing} +

    + {#if obj.examples_format} +

    + Format expected for examples: -

    + {@html obj.examples_format}} +

    + {/if} + {#if obj.events && obj.events.length > 0} +

    + Supported events: + {@html obj.events} +

    + {/if} + {/if} + + {#if obj.example} +

    + Example Usage + +

    +
    +
    {@html obj.highlighted_example}
    +
    + {/if} + + {#if (obj.parameters.length > 0 && obj.parameters[0].name != "self") || obj.parameters.length > 1} +

    + Initialization + +

    + + + + + + + + + + {#each obj.parameters as param} + {#if param["name"] != "self"} + + + + + {/if} + {/each} + +
    ParameterDescription
    + + {param["name"]} + +

    + {param["annotation"]} +

    + {#if "default" in param} +

    + default: {param["default"]} +

    + {:else if !("kwargs" in param)} +

    + required +

    + {/if} +
    +

    {param["doc"] || ""}

    +
    + {/if} + + {#if mode === "components" && obj.string_shortcuts} + + + + + + + + + + {#each obj.string_shortcuts as shortcut} + + + + + + {/each} + +
    ClassInterface String ShortcutInitialization
    +

    + gradio.{shortcut[0]} +

    +
    +

    "{shortcut[1]}"

    +
    + {shortcut[2]} +
    + {/if} + + {#if obj.fns && obj.fns.length > 0} +

    + Methods + +

    +

    Methods

    +
    + {#each obj.fns as fn} + + {/each} +
    +
    + {/if} + + {#if obj.guides && obj.guides.length > 0} +

    + Guides + +

    + +
    + {#each obj.guides as guide, i} + +
    +

    + {guide.pretty_name} +

    +
    +
    + {/each} +
    + {/if} + + {#if obj.demos} +
    +

    + Demos + +

    +
    +
    +
    +
    + {#each obj.demos as demo, i} + + {/each} +
    {#each obj.demos as demo, i} - + +
    {/each}
    - {#each obj.demos as demo, i} -
    - -
    - {/each}
    -
    - {/if} -
    - {/each} + {/if} +
    + {/each} +
    -
    diff --git a/js/_website/src/routes/guides/[guide=valid_guide]/+page.svelte b/js/_website/src/routes/guides/[guide=valid_guide]/+page.svelte index 0408361045..7ca2bdb677 100644 --- a/js/_website/src/routes/guides/[guide=valid_guide]/+page.svelte +++ b/js/_website/src/routes/guides/[guide=valid_guide]/+page.svelte @@ -100,7 +100,7 @@ {/each} {/each}
    -
    +
    {#if guide_page.spaces.length }