INNER CODE UNIT · Python

BaseFinder

instavm/clickclickclick · clickclickclick/finder/__init__.py:23

class BaseFinder(ABC):
    IMAGE_WIDTH = None
    IMAGE_HEIGHT = None
    OUTPUT_WIDTH = None
    OUTPUT_HEIGHT = None

    def __init__(self, api_key, model_name, generation_config, system_prompt, executor: Executor):
        self.model_name = model_name
        self.generation_config = generation_config
        self.system_prompt = system_prompt
        self.executor = executor

    def encode_image_to_base64(self, image_path):
        with open(image_path, "rb") as image_file:
            encoded_string = base64.b64encode(image_file.read()).decode("utf-8")
        return encoded_string

    def resize(self, image, new_size):

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…