Spaces:
Sleeping
Sleeping
| import json | |
| import os | |
| files = [ | |
| r'c:\react_projects\VortexCommerce\kaggle\extra_products_vortex.json', | |
| r'c:\react_projects\VortexCommerce\backend\kaggle\extra_products_vortex.json' | |
| ] | |
| for f_path in files: | |
| if os.path.exists(f_path): | |
| with open(f_path, "r", encoding="utf-8") as f: | |
| data = json.load(f) | |
| count = len(data["products"]) if isinstance(data, dict) and "products" in data else len(data) | |
| print(f"{f_path}: {count} products") | |
| else: | |
| print(f"{f_path}: NOT FOUND") | |