File size: 454 Bytes
5e6c73e
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
import json
from datasets import load_dataset

dataset1 = load_dataset("Kaballas/100")

# Assuming that 'instruction', 'input', and 'output' are keys in your dataset
# If not, you'll need to modify this part to extract the correct data
data = [{'instruction': item['instruction'], 'input': item['input'], 'output': item['output']} for item in dataset1['train']]

# Write the data to a JSON file
with open('output.json', 'w') as f:
    json.dump(data, f)