Spaces:
Sleeping
Sleeping
Upload folder using huggingface_hub
Browse files- hosting.py +12 -0
hosting.py
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
from huggingface_hub import HfApi
|
| 2 |
+
import os
|
| 3 |
+
|
| 4 |
+
api = HfApi(token=os.getenv("HF_TOKEN"))
|
| 5 |
+
api.upload_folder(
|
| 6 |
+
folder_path="Predictive_Maintenance/deployment", # the local folder containing your files
|
| 7 |
+
# replace with your repoid
|
| 8 |
+
repo_id="Roshanmpraj/PredictiveMaintenance", # the target repo
|
| 9 |
+
|
| 10 |
+
repo_type="space",
|
| 11 |
+
path_in_repo="",
|
| 12 |
+
)
|