in data_preparation/export_to_hub.py [0:0]
def generate_examples(data_paths: List[str], instructions: List[str]):
def fn():
for data_path in data_paths:
yield {
"original_image": {"path": data_path[0]},
"edit_prompt": np.random.choice(instructions),
"cartoonized_image": {"path": data_path[1]},
}
return fn