|
from datasets import DatasetDict, load_dataset |
|
|
|
|
|
def construct_hf_dataset(repo_name: str): |
|
"""Construct a HF DatasetDict class from the HICRIC outcome data.""" |
|
|
|
|
|
train_jsonl_path = "outcomes/train_backgrounds_suff.jsonl" |
|
test_jsonl_path = "outcomes/test_backgrounds_suff.jsonl" |
|
train_dataset = load_dataset("json", data_files=train_jsonl_path, split="train") |
|
test_dataset = load_dataset("json", data_files=test_jsonl_path, split="train") |
|
|
|
|
|
dataset = DatasetDict({"train": train_dataset, "test": test_dataset}) |
|
|
|
|
|
dataset.push_to_hub(repo_name, private=True) |
|
|
|
return None |
|
|
|
|
|
if __name__ == "__main__": |
|
construct_hf_dataset("persius/imr-appeals") |
|
|