plc-llm-bench / scripts /extract_cells.py
iulio's picture
Upload folder using huggingface_hub
3bccd69 verified
Raw History Blame Contribute Delete
377 Bytes
import json
from pathlib import Path
root = Path("d:/UsefulNotebooks/plc-llm-bench")
cells = json.loads((root / "cells_to_push.json").read_text(encoding="utf-8"))
for i in range(12, 18):
c = cells[i]
out_file = root / f"cell_{i}.txt"
out_file.write_text(c["content"], encoding="utf-8")
print(f"Wrote cell_{i}.txt (type={c['type']}, len={len(c['content'])})")