Skip to content

Commit

Permalink
format code
Browse files Browse the repository at this point in the history
  • Loading branch information
AsiaCao committed Mar 26, 2024
1 parent 04345a1 commit 8bdd8a9
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion vision_agent/image_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
3 changes: 2 additions & 1 deletion vision_agent/tools/tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 = {
Expand Down Expand Up @@ -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 = {
Expand Down

0 comments on commit 8bdd8a9

Please sign in to comment.