Download XGBOOST_XAI/json_convert.py from Wrostdevil/hackmol-hackathon: direct link, hf CLI and curl.
- Browser
- Download file 368 Bytes
-
https://huggingface.co/Wrostdevil/hackmol-hackathon/resolve/main/XGBOOST_XAI/json_convert.py
- Command line
-
hf download hf://Wrostdevil/hackmol-hackathon/XGBOOST_XAI/json_convert.py
-
curl -L -o json_convert.py https://huggingface.co/Wrostdevil/hackmol-hackathon/resolve/main/XGBOOST_XAI/json_convert.py
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 💫") |