File size: 1,628 Bytes
0ad74ed |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 |
<script lang="ts">
export let type: "gallery" | "plot" | "audio" | "video" | "image" | string;
export let components;
export let value;
export let target;
export let theme_mode;
export let props;
export let i18n;
export let upload;
export let _fetch;
</script>
{#if type === "gallery"}
<svelte:component
this={components[type]}
{value}
show_label={false}
{i18n}
label=""
{_fetch}
allow_preview={false}
interactive={false}
mode="minimal"
fixed_height={1}
on:load
/>
{:else if type === "plot"}
<svelte:component
this={components[type]}
{value}
{target}
{theme_mode}
bokeh_version={props.bokeh_version}
caption=""
show_actions_button={true}
on:load
/>
{:else if type === "audio"}
<svelte:component
this={components[type]}
{value}
show_label={false}
show_share_button={true}
{i18n}
label=""
waveform_settings={{}}
waveform_options={{}}
show_download_button={false}
on:load
/>
{:else if type === "video"}
<svelte:component
this={components[type]}
autoplay={true}
value={value.video || value}
show_label={false}
show_share_button={true}
{i18n}
{upload}
show_download_button={false}
on:load
>
<track kind="captions" />
</svelte:component>
{:else if type === "image"}
<svelte:component
this={components[type]}
{value}
show_label={false}
label="chatbot-image"
show_download_button={false}
on:load
{i18n}
/>
{:else if type === "html"}
<svelte:component
this={components[type]}
{value}
show_label={false}
label="chatbot-image"
show_share_button={true}
{i18n}
gradio={{ dispatch: () => {} }}
on:load
/>
{/if}
|