There was an error while loading. Please reload this page.
2 parents 02fb113 + 2cb0a28 commit ac8289aCopy full SHA for ac8289a
1 file changed
src/models/base.py
@@ -358,11 +358,11 @@ def _load_input_data(self) -> Iterator[ModelInput]:
358
prompt = self._generate_prompt(row['prompt'])
359
data = self._generate_processor_output(
360
prompt=prompt,
361
- img_path=row['image']
+ img_path=row['image'] if self.config.has_images() else None
362
)
363
364
yield {
365
- 'image': row['image'],
+ 'image': row['image'] if self.config.has_images() else self.config.NO_IMG_PROMPT,
366
'prompt': row['prompt'],
367
'label': row['label'] if 'label' in self.config.dataset.column_names else None,
368
'data': data,
0 commit comments