Skip to content

Commit

Permalink
Fix typing errors
Browse files Browse the repository at this point in the history
  • Loading branch information
AsiaCao committed Mar 11, 2024
1 parent e4f3b7e commit dfdb792
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion vision_agent/image_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
from PIL import Image


def b64_to_pil(b64_str: str) -> Image:
def b64_to_pil(b64_str: str) -> Image.Image:
# , can't be encoded in b64 data so must be part of prefix
if "," in b64_str:
b64_str = b64_str.split(",")[1]
Expand Down
4 changes: 2 additions & 2 deletions vision_agent/tools/tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,8 @@ def __call__(self, image: Union[str, Path, ImageType]) -> List[Dict]:
)
resp_json: Dict[str, Any] = res.json()
if resp_json["statusCode"] != 200:
_LOGGER.error(f"Request failed: {resp_json['data']}")
return cast(str, resp_json["data"])
_LOGGER.error(f"Request failed: {resp_json}")
return cast(List[Dict], resp_json["data"])


class GroundingSAM(ImageTool):
Expand Down

0 comments on commit dfdb792

Please sign in to comment.