zea.data.app¶

Gradio visualiser for zea datasets.

Usage:

python -m zea.data.app python -m zea.data.app –share python -m zea.data.app –server-port 7861 python -m zea.data.app –presets zea/data/app_presets.yaml # try local preset edits

Functions

build_interface([presets])

Build and return the Gradio Blocks interface.

build_theme()

Calm, neutral theme with zea yellow as the only accent.

frame_picker([single])

Frame picker: a two-handle slider plus number inputs for a clip's start and end.

load_presets([path, revision])

Load the example presets, falling back to the copy bundled with zea.

main()

Entry point for python -m zea.data.app, equivalent to zea app.

run_checks(dataset_path, config_path[, ...])

Validate and beamform frame(s) from a zea dataset; yields (html, image) pairs.

zea.data.app.build_interface(presets=None)[source]¶

Build and return the Gradio Blocks interface.

Parameters:

presets (dict[str, dict] | None) – {name: preset} for the preset dropdown; defaults to load_presets().

Return type:

Blocks

zea.data.app.build_theme()[source]¶

Calm, neutral theme with zea yellow as the only accent.

Return type:

Base

zea.data.app.frame_picker(single=False, **kwargs)[source]¶

Frame picker: a two-handle slider plus number inputs for a clip’s start and end.

The value is [start, end, last]: inclusive frame indices plus the file’s last frame index, which bounds the picker. The frame count to process is shown next to the inputs. With single=True it picks one frame with one handle, and the value is [frame, frame, last].

Everything the picker needs is in the value (and single in its script) rather than in custom props: a component in a tab that has not been opened yet mounts with only its latest update, dropping custom props. It is a configured gr.HTML rather than a subclass, because Gradio writes a .pyi stub next to the source of every component subclass.

Return type:

HTML

zea.data.app.load_presets(path='hf://zeahub/app/presets.yaml', revision='latest')[source]¶

Load the example presets, falling back to the copy bundled with zea.

Parameters:
  • path (str) – Local path or hf:// path of a presets YAML file.

  • revision (str) – Branch, tag or PR ref of an hf:// path; "latest" means "main".

Return type:

dict[str, dict]

zea.data.app.main()[source]¶

Entry point for python -m zea.data.app, equivalent to zea app.

Return type:

None

zea.data.app.run_checks(dataset_path, config_path, dataset_revision=None, config_revision=None, key='data/raw_data', file_index=0, start_frame=0, n_frames=1, keep_keys=('maxval',), stop_check=None, track_index=0, status_lines=None)[source]¶

Validate and beamform frame(s) from a zea dataset; yields (html, image) pairs.

Pass a list as status_lines to have the individual status lines collected into it (the latest step is status_lines[-1]).