Skip to content

Commit

Permalink
removed old code
Browse files Browse the repository at this point in the history
  • Loading branch information
dillonalaird committed Sep 19, 2024
1 parent 2b7be77 commit cbcd355
Showing 1 changed file with 0 additions and 23 deletions.
23 changes: 0 additions & 23 deletions vision_agent/agent/vision_agent_coder.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,29 +92,6 @@ def format_plans(plans: Dict[str, Any]) -> str:
return plan_str


def extract_image(
media: Optional[Sequence[Union[str, Path]]],
) -> Optional[Sequence[Union[str, Path]]]:
if media is None:
return None

new_media = []
for m in media:
m = Path(m)
extension = m.suffix
if extension in [".jpg", ".jpeg", ".png", ".bmp"]:
new_media.append(m)
elif extension in [".mp4", ".mov"]:
frames = T.extract_frames(m)
with tempfile.NamedTemporaryFile(suffix=".png", delete=False) as tmp:
if len(frames) > 0:
Image.fromarray(frames[0][0]).save(tmp.name)
new_media.append(Path(tmp.name))
if len(new_media) == 0:
return None
return new_media


def write_plans(
chat: List[Message],
tool_desc: str,
Expand Down

0 comments on commit cbcd355

Please sign in to comment.