Generate evaluation content for a video.
(self, video: 'llava.Video', prompt: str, cot: bool = True)
| 137 | return llava.Video(str(video_path)) |
| 138 | |
| 139 | def evaluate_video(self, video: 'llava.Video', prompt: str, cot: bool = True) -> str: |
| 140 | """Generate evaluation content for a video.""" |
| 141 | if not cot: |
| 142 | prompt = prompt.replace( |
| 143 | "Let's think step-by-step and conclude with", "Answer with" |
| 144 | ).replace( |
| 145 | "Let's analyze step-by-step and conclude with", "Answer with" |
| 146 | ) |
| 147 | return self.judge.generate_content([video, prompt]) |
| 148 | |
| 149 | def process_results(self, preds: Dict, accs: defaultdict) -> float: |
| 150 | """Process and print evaluation results with rich formatting.""" |