Tags List Preview widget simply displays a list of tags. It can be used to display tags that were selected by the user in the Tags List Selector widget for example.
In this example we will create a mini app with TagsListPreview widget. We will create a TagsListSelector widget and display selected tags with TagsListPreview widget.
You can find this example in our Github repository:
import os
import supervisely as sly
from supervisely.app.widgets import (
Card,
Container,
TagsListPreview,
TagsListSelector,
Text,
)
from dotenv import load_dotenv
Init API client
First, we load environment variables with credentials and init API for communicating with Supervisely Instance:
load_dotenv("local.env")
load_dotenv(os.path.expanduser("~/supervisely.env"))
api = sly.Api()
Create list of tag metas and init TagsListSelector widget