from huggingface_hub import HfApi # 定义数据集路径和目标URL dataset_dir = "/home/yiyangai/stephenqs/datasets/physics_big" repo_url = "StarThomas1002/my-phy-dataset" # 创建HfApi实例 api = HfApi() # 上传临时目录中的所有文件到 Hugging Face 数据集库 api.upload_folder( folder_path=dataset_dir, repo_id=repo_url, repo_type="dataset" )