Chia Woon Yap commited on
Delete created_subfolder.py
Browse files- created_subfolder.py +0 -17
created_subfolder.py
DELETED
|
@@ -1,17 +0,0 @@
|
|
| 1 |
-
from huggingface_hub import Repository
|
| 2 |
-
|
| 3 |
-
# Define your local directory and Hugging Face repository URL
|
| 4 |
-
local_dir = "path_to_local_repo"
|
| 5 |
-
repo_url = "https://huggingface.co/Lesterchia174/Monkey_Durian"
|
| 6 |
-
|
| 7 |
-
# Clone the repository
|
| 8 |
-
repo = Repository(local_dir=local_dir, clone_from=repo_url)
|
| 9 |
-
|
| 10 |
-
# Create the subfolder and add files
|
| 11 |
-
import os
|
| 12 |
-
os.makedirs(f"{local_dir}/best_int8_openvino_model", exist_ok=True)
|
| 13 |
-
with open(f"{local_dir}/best_int8_openvino_model/sample_file.txt", "w") as f:
|
| 14 |
-
f.write("This is a test file.")
|
| 15 |
-
|
| 16 |
-
# Push changes to the repository
|
| 17 |
-
repo.push_to_hub(commit_message="Created subfolder best_int8_openvino_model and added files")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|