Upload upload.py with huggingface_hub
Browse files
upload.py
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import os
|
| 2 |
+
from huggingface_hub import upload_file
|
| 3 |
+
|
| 4 |
+
repo_id = "JustDelet/R3GEN-COCO"
|
| 5 |
+
local_folder = "/home2/zbz5349/aigeeks/RL"
|
| 6 |
+
|
| 7 |
+
for file_name in os.listdir(local_folder):
|
| 8 |
+
file_path = os.path.join(local_folder, file_name)
|
| 9 |
+
if os.path.isfile(file_path):
|
| 10 |
+
upload_file(
|
| 11 |
+
path_or_fileobj=file_path,
|
| 12 |
+
path_in_repo=file_name,
|
| 13 |
+
repo_id=repo_id,
|
| 14 |
+
repo_type="dataset"
|
| 15 |
+
)
|