CoolFace
Datasetpublic

gradio/frontend

sourceHugging Faceupdated 6h agoView on Hugging Face
1likes403kdownloads
Index.svelte61 linesDownload Raw Back to plot
1<script context="module" lang="ts">2	export { default as BasePlot } from "./shared/Plot.svelte";3</script>4 5<script lang="ts">6	import { Gradio } from "@gradio/utils";7	import Plot from "./shared/Plot.svelte";8 9	import {10		Block,11		BlockLabel,12		FullscreenButton,13		IconButtonWrapper14	} from "@gradio/atoms";15	import { Plot as PlotIcon } from "@gradio/icons";16 17	import { StatusTracker } from "@gradio/statustracker";18	import type { PlotProps, PlotEvents } from "./types.ts";19 20	let props = $props();21	const gradio = new Gradio<PlotEvents, PlotProps>(props);22 23	let fullscreen = $state(false);24</script>25 26<Block27	padding={false}28	elem_id={gradio.shared.elem_id}29	elem_classes={gradio.shared.elem_classes}30	visible={gradio.shared.visible}31	container={gradio.shared.container}32	scale={gradio.shared.scale}33	min_width={gradio.shared.min_width}34	allow_overflow={false}35	bind:fullscreen36>37	<BlockLabel38		show_label={gradio.shared.show_label}39		label={gradio.shared.label || gradio.i18n("plot.plot")}40		Icon={PlotIcon}41	/>42	{#if gradio.props.show_fullscreen_button}43		<IconButtonWrapper>44			<FullscreenButton45				{fullscreen}46				on:fullscreen={({ detail }) => {47					fullscreen = detail;48				}}49			/>50		</IconButtonWrapper>51	{/if}52	<StatusTracker53		autoscroll={gradio.shared.autoscroll}54		i18n={gradio.i18n}55		{...gradio.shared.loading_status}56		on:clear_status={() =>57			gradio.dispatch("clear_status", gradio.shared.loading_status)}58	/>59	<Plot {gradio} />60</Block>61 
gradio/frontend · CoolFace