From 534c55caae8660cf3dca85e7bdb5b7fc8b0f4121 Mon Sep 17 00:00:00 2001 From: ueta-eisuke Date: Thu, 13 May 2021 21:34:19 +0900 Subject: [PATCH] fix readme --- README.md | 3 ++- fastlabel/__init__.py | 4 ++++ setup.py | 2 +- 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index bc3bc1f..f534e67 100644 --- a/README.md +++ b/README.md @@ -199,7 +199,7 @@ Supported following project types: ```python task = client.create_multi_image_task( project="YOUR_PROJECT_SLUG", - name="sample.jpg", + name="sample", folder_path="./sample", annotations=[{ "value": "annotation-value", @@ -209,6 +209,7 @@ task = client.create_multi_image_task( "value": "attribute-value" } ], + "content": "01.jpg", "points": [[[ 100, 100, diff --git a/fastlabel/__init__.py b/fastlabel/__init__.py index 6d3b278..cda8bbc 100644 --- a/fastlabel/__init__.py +++ b/fastlabel/__init__.py @@ -251,6 +251,10 @@ def create_multi_image_task( annotations is a list of annotation to be set in advance. (Optional) tags is a list of tag to be set in advance. (Optional) """ + if not os.path.isdir(folder_path): + raise FastLabelInvalidException( + "Folder does not exist.", 422) + endpoint = "tasks/multi/image" file_paths = glob.glob(os.path.join(folder_path, "*")) contents = [] diff --git a/setup.py b/setup.py index b935c0c..8be96f4 100644 --- a/setup.py +++ b/setup.py @@ -8,7 +8,7 @@ setuptools.setup( name="fastlabel", - version="0.4.0", + version="0.4.1", author="eisuke-ueta", author_email="eisuke.ueta@fastlabel.ai", description="The official Python SDK for FastLabel API, the Data Platform for AI",