Skip to content

Commit

Permalink
formatting fix
Browse files Browse the repository at this point in the history
  • Loading branch information
dillonalaird committed Oct 4, 2024
1 parent 5e33fcc commit dbdb9b3
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 5 deletions.
4 changes: 3 additions & 1 deletion vision_agent/tools/meta_tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,9 @@ def show(self, uploaded_file_path: Optional[Union[str, Path]] = None) -> str:
)
output_str = "[Artifacts loaded]\n"
for k in self.artifacts.keys():
output_str += f"Artifact name: {k}, loaded to path: {str(loaded_path / k)}\n"
output_str += (
f"Artifact name: {k}, loaded to path: {str(loaded_path / k)}\n"
)
output_str += "[End of artifacts]\n"
print(output_str)
return output_str
Expand Down
2 changes: 1 addition & 1 deletion vision_agent/tools/tool_utils.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import os
import inspect
import logging
import os
from base64 import b64encode
from typing import Any, Callable, Dict, List, MutableMapping, Optional, Tuple

Expand Down
8 changes: 6 additions & 2 deletions vision_agent/tools/tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -1808,7 +1808,9 @@ def save_image(image: np.ndarray, file_path: str) -> None:
"""
from IPython.display import display

if not isinstance(image, np.ndarray) or (image.shape[0] == 0 and image.shape[1] == 0):
if not isinstance(image, np.ndarray) or (
image.shape[0] == 0 and image.shape[1] == 0
):
raise ValueError("The image is not a valid NumPy array with shape (H, W, C)")

pil_image = Image.fromarray(image.astype(np.uint8)).convert("RGB")
Expand Down Expand Up @@ -1844,7 +1846,9 @@ def save_video(
if not isinstance(frame, np.ndarray) or (
frame.shape[0] == 0 and frame.shape[1] == 0
):
raise ValueError("The frame is not a valid NumPy array with shape (H, W, C)")
raise ValueError(
"The frame is not a valid NumPy array with shape (H, W, C)"
)

if output_video_path is None:
output_video_path = tempfile.NamedTemporaryFile(
Expand Down
2 changes: 1 addition & 1 deletion vision_agent/tools/tools_types.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from enum import Enum
from uuid import UUID
from typing import List, Optional, Tuple, Union
from uuid import UUID

from pydantic import BaseModel, ConfigDict, Field, SerializationInfo, field_serializer

Expand Down

0 comments on commit dbdb9b3

Please sign in to comment.