hackmol-hackathon / XGBOOST_XAI /json_convert.py
Wrostdevil's picture
Upload folder using huggingface_hub
8cc301a verified
raw
history blame
368 Bytes
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 💫")