rain1024 commited on
Commit
6b603d9
·
verified ·
1 Parent(s): 10dee57

Upload scripts/upload_to_hf.py with huggingface_hub

Browse files
Files changed (1) hide show
  1. scripts/upload_to_hf.py +23 -0
scripts/upload_to_hf.py ADDED
@@ -0,0 +1,23 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ """
2
+ Upload UVN dataset to HuggingFace Hub.
3
+ """
4
+
5
+ from pathlib import Path
6
+ from datasets import load_from_disk
7
+
8
+ DATASET_DIR = Path(__file__).parent.parent / "dataset" / "UVN-1"
9
+ HF_REPO = "undertheseanlp/UVN-1"
10
+
11
+
12
+ def main():
13
+ # Load dataset
14
+ dataset = load_from_disk(DATASET_DIR)
15
+ print(f"Loaded dataset with {len(dataset['train'])} train and {len(dataset['test'])} test samples")
16
+
17
+ # Push to HuggingFace Hub
18
+ dataset.push_to_hub(HF_REPO, private=False)
19
+ print(f"\nDataset uploaded to: https://huggingface.co/datasets/{HF_REPO}")
20
+
21
+
22
+ if __name__ == "__main__":
23
+ main()