|
146 | 146 | "# Use CONFIG as the main config object\n", |
147 | 147 | "config = CONFIG\n", |
148 | 148 | "\n", |
| 149 | + "# Load environment info from previous step\n", |
| 150 | + "env_path = ocr_data_path.parent / \"environment.json\"\n", |
| 151 | + "with open(env_path, 'r') as f:\n", |
| 152 | + " env_info = json.load(f)\n", |
| 153 | + "\n", |
149 | 154 | "# Display configuration details\n", |
150 | 155 | "classification_config = config.get('classification', {})\n", |
151 | 156 | "print(\"\\nClassification Configuration:\")\n", |
|
581 | 586 | "with open(summary_path, 'w') as f:\n", |
582 | 587 | " json.dump(summary, f, indent=2)\n", |
583 | 588 | " \n", |
584 | | - "print(f\"💾 Saved classification summary to: {summary_path}\")" |
| 589 | + "print(f\"💾 Saved classification summary to: {summary_path}\")\n", |
| 590 | + "\n", |
| 591 | + "# Save configuration (pass through)\n", |
| 592 | + "config_path = output_dir / \"config.json\"\n", |
| 593 | + "with open(config_path, 'w') as f:\n", |
| 594 | + " json.dump(CONFIG, f, indent=2)\n", |
| 595 | + "\n", |
| 596 | + "# Save environment info (pass through)\n", |
| 597 | + "env_path = output_dir / \"environment.json\"\n", |
| 598 | + "with open(env_path, 'w') as f:\n", |
| 599 | + " json.dump(env_info, f, indent=2)\n", |
| 600 | + "\n", |
| 601 | + "print(f\"💾 Saved configuration to: {config_path}\")\n", |
| 602 | + "print(f\"💾 Saved environment info to: {env_path}\")" |
585 | 603 | ] |
586 | 604 | }, |
587 | 605 | { |
|
0 commit comments