Spaces:
Sleeping
Sleeping
| from datasets import load_dataset | |
| import random | |
| dataset = load_dataset("heramb04/cmp-facade-samples", split="train") | |
| def get_random_sample_with_image(): | |
| idx = random.randint(0, len(dataset) - 1) | |
| image = dataset[idx]["image"] | |
| return image.convert("RGB"), idx |