創(chuàng)建數(shù)據(jù)集
目錄結(jié)構(gòu)
hfdataset/
└── train/
└── metadata.jsonl
└── sdsdyk.wav
└── ylfbnqsds.wav
└── test/
└── metadata.jsonl
└── sdsdyk.wav
└── ylfbnqsds.wav
metadata.jsonl內(nèi)容格式
{"file_name": "sdsdyk.wav", "sentence": "圣燈山的游客"}
{"file_name": "ylfbnqsds.wav", "sentence": "巴南區(qū)圣燈山"}
上傳數(shù)據(jù)集
以命令行的方式上傳數(shù)據(jù)集
- 進入hfdataset目錄,登錄huggingface
PS D:\software\hfdataset> huggingface-cli login
- 執(zhí)行上傳命令
PS D:\software\hfdataset> hf upload my-cool-dataset . . --repo-type dataset
my-cool-dataset為自己的數(shù)據(jù)集名稱,沒有的話會自動創(chuàng)建,有的話會替換內(nèi)容。
備注說明
值得注意的是,一些命令已被棄用,但文檔中并非更新,執(zhí)行時如報一警告錯誤,例如在huggingface中創(chuàng)建空數(shù)據(jù)集文檔(my-cool-dataset)的命令:
huggingface-cli repo create my-cool-dataset --type dataset
首先,huggingface-cli已被棄用,需改為hf。其次,hf識別不到--type這個參數(shù),去掉即可,修改后的命令如下:
hf repo create my-cool-dataset