Spaces:
Build error
Build error
Create huggingface_hub
Browse files- huggingface_hub +15 -0
huggingface_hub
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
from huggingface_hub import HfApi, create_repo, upload_folder
|
| 2 |
+
|
| 3 |
+
# Replace with your Hugging Face username and app name
|
| 4 |
+
username = "Anupam251272"
|
| 5 |
+
repo_name = "Universal-LLM-Tester"
|
| 6 |
+
|
| 7 |
+
# Create a new repo (skip this if the repo already exists)
|
| 8 |
+
create_repo(repo_name, private=False, repo_type="space")
|
| 9 |
+
|
| 10 |
+
# Upload files to the repo
|
| 11 |
+
upload_folder(
|
| 12 |
+
folder_path=".", # Path to your app directory
|
| 13 |
+
repo_id=f"{username}/{repo_name}",
|
| 14 |
+
repo_type="space"
|
| 15 |
+
)
|