mirror of
https://github.com/gradio-app/gradio.git
synced 2025-01-18 10:44:33 +08:00
stop interface from erroring out
This commit is contained in:
parent
e80d20390c
commit
566c954c30
@ -2,6 +2,7 @@
|
||||
import { deepCopy } from "./components/utils/helpers";
|
||||
import ExampleSet from "./ExampleSet.svelte";
|
||||
import { _ } from "svelte-i18n";
|
||||
import { component_map } from "./components/directory";
|
||||
|
||||
interface Component {
|
||||
name: string;
|
||||
@ -57,7 +58,7 @@
|
||||
const setExampleId = async (example_id: number) => {
|
||||
input_components.forEach(async (input_component, i) => {
|
||||
const process_example =
|
||||
input_component_map[input_component.name].process_example;
|
||||
component_map[input_component.name].process_example;
|
||||
if (process_example !== undefined) {
|
||||
input_values[i] = await process_example(
|
||||
examples[example_id][i],
|
||||
@ -211,7 +212,7 @@
|
||||
<em>(optional)</em>{/if}
|
||||
</div>
|
||||
<svelte:component
|
||||
this={input_component_map[input_component.name][
|
||||
this={component_map[input_component.name][
|
||||
interpret_mode ? "interpretation" : "component"
|
||||
]}
|
||||
{...input_component}
|
||||
@ -286,7 +287,7 @@
|
||||
<div class="component">
|
||||
<div class="panel-header mb-1.5">{output_component.label}</div>
|
||||
<svelte:component
|
||||
this={output_component_map[output_component.name].component}
|
||||
this={component_map[output_component.name].component}
|
||||
{...output_component}
|
||||
{theme}
|
||||
{static_src}
|
||||
|
Loading…
Reference in New Issue
Block a user