# src/data_loader.py import json import os DATA_DIR = "../datasets/microlabs_usa/" def load_all_data(): all_products = [] for filename in os.listdir(DATA_DIR): if filename.endswith('.json'): with open(os.path.join(DATA_DIR, filename), 'r') as f: product = json.load(f) all_products.append(product) return all_products if __name__ == "__main__": data = load_all_data() print(f"Loaded {len(data)} products.")