| 239 | |
| 240 | |
| 241 | class IMGReader(Reader): |
| 242 | def parse(self, file_path: Path, task: str = "Describe this image as detail as possible." ) -> str: |
| 243 | logger.info(f"Reading image file from {file_path}.") |
| 244 | runner = VisualLLMRegistry.get() |
| 245 | answer = runner.gen(task, file_path) |
| 246 | return answer |
| 247 | |
| 248 | class VideoReader(Reader): |
| 249 | def parse(self, file_path: Path, task: str = "Describe this image as detail as possible.", frame_interval: int = 30, used_audio: bool = True) -> list: |