Spaces:
Sleeping
Sleeping
File size: 515 Bytes
35b3f62 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 |
from huggingface_hub import hf_hub_download
import json
import os
file_path = hf_hub_download(
repo_id="PledgeTracker/demo_feedback", # 你的私密 dataset 名
filename="train_useful.json", # 你上传的文件名
repo_type="dataset", # 必须设置为 dataset 类型
token=os.environ["HF_TOKEN"] # 需要 HF token 才能访问私密文件
)
with open(file_path, "r", encoding="utf-8") as f:
train_data = json.load(f)
print(train_data[0]) |