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 and return the Gradio Blocks interface. |
Calm, neutral theme with zea yellow as the only accent. |
|
|
Frame picker: a two-handle slider plus number inputs for a clip's start and end. |
|
Load the example presets, falling back to the copy bundled with zea. |
|
Entry point for |
|
Validate and beamform frame(s) from a zea dataset; yields |
- 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 toload_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. Withsingle=Trueit picks one frame with one handle, and the value is[frame, frame, last].Everything the picker needs is in the value (and
singlein 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 configuredgr.HTMLrather than a subclass, because Gradio writes a.pyistub 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 orhf://path of a presets YAML file.revision (
str) – Branch, tag or PR ref of anhf://path;"latest"means"main".
- Return type:
dict[str,dict]
- zea.data.app.main()[source]¶
Entry point for
python -m zea.data.app, equivalent tozea 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]).