Delete outputs/upload-images-script.py
Browse files
outputs/upload-images-script.py
DELETED
|
@@ -1,26 +0,0 @@
|
|
| 1 |
-
import os
|
| 2 |
-
from huggingface_hub import HfApi
|
| 3 |
-
|
| 4 |
-
# Hugging Face dataset details
|
| 5 |
-
dataset_name = "replicate/flux-layer-outputs"
|
| 6 |
-
output_folder = "/outputs"
|
| 7 |
-
|
| 8 |
-
# Initialize Hugging Face API
|
| 9 |
-
api = HfApi()
|
| 10 |
-
|
| 11 |
-
# Get the current directory
|
| 12 |
-
current_directory = os.getcwd()
|
| 13 |
-
|
| 14 |
-
# Upload the entire directory
|
| 15 |
-
try:
|
| 16 |
-
api.upload_folder(
|
| 17 |
-
folder_path=current_directory,
|
| 18 |
-
repo_id=dataset_name,
|
| 19 |
-
repo_type="dataset",
|
| 20 |
-
path_in_repo=output_folder
|
| 21 |
-
)
|
| 22 |
-
print(f"Successfully uploaded the entire directory to {dataset_name}{output_folder}")
|
| 23 |
-
except Exception as e:
|
| 24 |
-
print(f"Failed to upload directory: {str(e)}")
|
| 25 |
-
|
| 26 |
-
print("Upload process completed.")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|