from huggingface_hub import HfApi | |
from huggingface_hub.utils import enable_progress_bars | |
enable_progress_bars() | |
api = HfApi() | |
repo_id = "OzoneAsai/calculation" | |
for i in range(1, 60): | |
input_file_path = f"./output{str(i)}.json" | |
output_file_path = f"output{str(i)}.json" | |
api.upload_file( | |
path_or_fileobj=input_file_path, | |
path_in_repo=output_file_path, | |
repo_id=repo_id, | |
repo_type="dataset", | |
) | |