import json # Input and output file names input_file = "ML2.ipynb" output_file = "ML2.json" # Load the notebook with open(input_file, "r", encoding="utf-8") as f: notebook = json.load(f) # Save as JSON (pretty formatted) with open(output_file, "w", encoding="utf-8") as f: json.dump(notebook, f, indent=4) print("Converted successfully 💫")