File size: 407 Bytes
14e4843 d6d7ec6 14e4843 d6d7ec6 14e4843 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 |
#!/usr/bin/env python3
import glob
import os
from datasets import load_dataset
path = "pminervini/true-false"
folder_path = "true-false-data/" # Replace with your folder path
# Search for all .json files in the folder
csv_files = glob.glob(os.path.join(folder_path, "*.csv"))
ds = load_dataset("csv", data_files={os.path.basename(path).split("_")[0]: path for path in csv_files})
ds.push_to_hub(path)
|