DatasetThumbnail
Introduction
DatasetThumbnail widget in Supervisely is a widget that allows to display a thumbnail image that represents supervisely dataset. It is a useful widget for applications that run from specific dataset, allowing users to have quick access to this dataset, so that when the user clicks on the thumbnail, the link will take him to this dataset.
Function signature
DatasetThumbnail(
project_info=None,
dataset_info=None,
show_project_name=True,
widget_id=None
)
Parameters
project_info
ProjectInfo
NamedTuple, containing information about project
dataset_info
DatasetInfo
NamedTuple, containing information about dataset
show_project_name
bool
Determines to display project name
widget_id
str
ID of the widget
project_info
NamedTuple, containing information about project.
type: ProjectInfo
default value: None
dataset_info
NamedTuple, containing information about dataset.
type: DatasetInfo
default value: None
show_project_name
Determines to display project name.
type: bool
default value: True

widget_id
ID of the widget.
type: str
default value: None
Methods and attributes
set(project_info: ProjectInfo, dataset_info: DatasetInfo, show_project_name: bool = True)
Set input project data.
Mini App Example
You can find this example in our Github repository:
ui-widgets-demos/thumbnail/002_dataset_thumbnail/src/main.py
Import libraries
Init API client
First, we load environment variables with credentials and init API for communicating with Supervisely Instance:
Get project ID and info
Get dataset ID and info
Initialize DatasetThumbnail widget
DatasetThumbnail widgetCreate app layout
Prepare a layout for app using Card widget with the content parameter and place widget that we've just created in the Container widget.
Create app using layout
Create an app object with layout parameter.

Last updated
Was this helpful?