TabsDynamic
Last updated
Last updated
TabsDynamic
is a versatile widget in Supervisely that allows users to display and edit YAML files within their info, such as NN model settings. The widget can divide the YAML file into separate tabs, making it easier to navigate and manage complex data structures. Additionally, users can edit the YAML directly within the widget and obtain a merged YAML file with their changes. TabsDynamic
also enables users to get or set the active tab from code.
filepath_or_raw_yaml
str
Path to yaml file or string
type
Literal["card", "border-card"]
Determine style of widget tabs
disabled
bool
Disable widget
widget_id
str
ID of the widget
Determine path to yaml input file or string.
type: str
Determine style of widget tabs.
type: Literal["card", "border-card"]
default value: border-card
Disable widget.
type: bool
default value: false
ID of the widget.
type: str
default value: None
set_active_tab()
Set active tab.
get_active_tab()
Return active tab.
get_merged_yaml()
Return merged yaml.
disable()
Disable widget.
enable()
Enable widget.
You can find this example in our Github repository:
ui-widgets-demos/layouts and containers/013_tabs_dynamic/src/main.py
First, we load environment variables with credentials and init API for communicating with Supervisely Instance:
TabsDynamic
widgetPrepare a layout for app using Card
widget with the content
parameter and place widget that we've just created in the Container
widget.
Create an app object with layout parameter.