View Specification
With the View Specifications, you can create a custom Instance View for your specific data. Under the hood, Zeno converts all the Standard Views into these View Specifications. For example, the image-classification view turns into:
{
"data": {
"type": "image"
},
"label": {
"type": "text"
},
"output": {
"type": "text"
}
}
Where type
is one of the View Element types. You can explore all the available preconfigured view specifications and experiment with your own specification using the Instance View Playground.
If you want to learn how to write your own view specification, the following should help you get started.
Check out the Instance View Playground to test out existing views and prototype new custom views.
View Specification
The top level of the View Specification contains keys for the three main inputs, data
, label
, and output
, and an optional displayType
:
{
"data": ...,
"label": ...,
"output": ...,
"size": ...,
"displayType": ...
}
Properties
Property | Type | Description |
---|---|---|
data | ViewElement | How to render data entries. |
label | ViewElement | How to render label entries. |
output | ViewElement | How to render output entries. |
size | "medium" | "large" | Width of the instance. |
displayType | Optional[String] | How to display data, label, and output entries. The default view is a vertical list and each of data , label and output must be ViewElements. If set to "table" , data , label , and output must be Separated Values. |