From 8bdd8a96d687b721731a8d9afaf701d840f59701 Mon Sep 17 00:00:00 2001 From: Yazhou Cao Date: Tue, 26 Mar 2024 15:34:47 -0700 Subject: [PATCH] format code --- vision_agent/image_utils.py | 2 +- vision_agent/tools/tools.py | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/vision_agent/image_utils.py b/vision_agent/image_utils.py index 96699f96..05a129ce 100644 --- a/vision_agent/image_utils.py +++ b/vision_agent/image_utils.py @@ -29,7 +29,7 @@ def get_image_size(data: Union[str, Path, np.ndarray, ImageType]) -> Tuple[int, """Get the size of an image. Parameters: - data: the input image + data: the input image Returns: The size of the image in the form (height, width) diff --git a/vision_agent/tools/tools.py b/vision_agent/tools/tools.py index 60c1cc00..c5f50e98 100644 --- a/vision_agent/tools/tools.py +++ b/vision_agent/tools/tools.py @@ -99,7 +99,7 @@ def __call__(self, prompt: List[str], image: Union[str, ImageType]) -> List[Dict image: the input image to classify. Returns: - A list of dictionaries containing the labels and scores. Each dictionary contains the classification result for an image. E.g. [{"labels": ["red line", "yellow dot"], "scores": [0.98, 0.02]}] + A list of dictionaries containing the labels and scores. Each dictionary contains the classification result for an image. E.g. [{"labels": ["red line", "yellow dot"], "scores": [0.98, 0.02]}] """ image_b64 = convert_to_b64(image) data = { @@ -342,6 +342,7 @@ def __call__(self, prompt: str, image: Union[str, ImageType]) -> Dict: class Crop(Tool): r"""Crop crops an image given a bounding box and returns a file name of the cropped image.""" + name = "crop_" description = "'crop_' crops an image given a bounding box and returns a file name of the cropped image." usage = {