diff --git a/config.json b/config.json index 402613a..4ea717f 100644 --- a/config.json +++ b/config.json @@ -2,12 +2,9 @@ "name": "Export as masks", "type": "app", "version": "2.0.0", - "categories": [ - "images", - "export" - ], + "categories": ["images", "export"], "description": "For semantic and instance segmentation tasks", - "docker_image": "supervisely/import-export:6.73.145", + "docker_image": "supervisely/import-export:6.73.156", "instance_version": "6.10.0", "main_script": "src/main.py", "modal_template": "src/modal.html", @@ -22,10 +19,8 @@ "icon_background": "#FFFFFF", "headless": true, "context_menu": { - "target": [ - "images_project" - ], + "target": ["images_project"], "context_root": "Download as" }, "poster": "https://user-images.githubusercontent.com/106374579/186664538-21e06509-7372-44db-9f0e-512be05cad91.png" -} \ No newline at end of file +} diff --git a/dev_requirements.txt b/dev_requirements.txt new file mode 100644 index 0000000..c8bec4f --- /dev/null +++ b/dev_requirements.txt @@ -0,0 +1 @@ +supervisely==6.73.156 diff --git a/requirements.txt b/requirements.txt deleted file mode 100644 index b921096..0000000 --- a/requirements.txt +++ /dev/null @@ -1,2 +0,0 @@ -# supervisely==6.73.145 -git+https://github.com/supervisely/supervisely.git@update-app-workflow diff --git a/src/workflow.py b/src/workflow.py index 73d20b6..28fd3c3 100644 --- a/src/workflow.py +++ b/src/workflow.py @@ -11,15 +11,15 @@ def workflow_output(api: sly.Api, file: Union[int, sly.api.file_api.FileInfo]): try: if isinstance(file, int): file = api.file.get_info_by_id(file) - meta = {"customRelationSettings": { - "icon": { - "icon": "zmdi-archive", - "color": "#33c94c", - "backgroundColor": "#d9f7e4" - }, - "title": f"

{file.name}

", - "mainLink": {"url": f"/files/{file.id}/true/?teamId={file.team_id}", "title": "Download"} - }} + relation_settings = sly.WorkflowSettings( + title=file.name, + icon="archive", + icon_color="#33c94c", + icon_bg_color="#d9f7e4", + url=f"/files/{file.id}/true/?teamId={file.team_id}", + url_title="Download", + ) + meta = sly.WorkflowMeta(relation_settings=relation_settings) api.app.workflow.add_output_file(file, meta=meta) sly.logger.debug(f"Workflow: Output file - {file}") except Exception as e: