Spaces:
Sleeping
Sleeping
File size: 530 Bytes
50e583f |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 |
import json
# Load the original file
with open('/l/users/salma.hassan/TrialGPT_scratch/dataset/sigir/id2queries.json', 'r') as f:
data = json.load(f)
# Wrap each entry with 'gpt-35-turbo'
wrapped = {}
for k, v in data.items():
wrapped[k] = {"gpt-35-turbo": v}
# Write to a new file (to avoid overwriting the original)
with open('/l/users/salma.hassan/TrialGPT_scratch/dataset/sigir/id2queries_gpt35turbo.json', 'w') as f:
json.dump(wrapped, f, indent=2)
print('Done. Output written to id2queries_gpt35turbo.json') |