Spaces:
No application file
No application file
from abc import ABC, abstractmethod | |
import torch | |
from models.base import (BaseAnswer, | |
AnswerResult) | |
class MultimodalAnswerResult(AnswerResult): | |
image: str = None | |
class LavisBlip2Multimodal(BaseAnswer, ABC): | |
def _blip2_instruct(self) -> any: | |
"""Return _blip2_instruct of blip2.""" | |
def _image_blip2_vis_processors(self) -> dict: | |
"""Return _image_blip2_vis_processors of blip2 image processors.""" | |
def set_image_path(self, image_path: str): | |
"""set set_image_path""" | |