Team Ai
Datasetpublic

codekingpro/portable-devtools

sourceHugging Faceupdated 5mo agoView on Hugging Face
1likes14kdownloads
image.py16 linesDownload Raw Back to utils
1"""Utilities for image processing."""2 3from typing import Any4 5 6def __getattr__(name: str) -> Any:7    if name in {"encode_image", "image_to_data_url"}:8        msg = (9            f"'{name}' has been removed for security reasons.\n\n"10            f"Usage of this utility in environments with user-input paths is a "11            f"security vulnerability. Out of an abundance of caution, the utility "12            f"has been removed to prevent possible misuse."13        )14        raise ValueError(msg)15    raise AttributeError(name)16 
codekingpro/portable-devtools · Team Ai