Sam Chaudry
commited on
Upload folder using huggingface_hub
Browse files- .huggingfaceignore +7 -13
- upload_to_huggingface.py +5 -9
.huggingfaceignore
CHANGED
@@ -1,20 +1,14 @@
|
|
1 |
# Ignore virtual environments
|
2 |
venv/
|
3 |
-
.
|
4 |
-
__pycache__/
|
5 |
-
*.pyc
|
6 |
|
7 |
-
# Ignore
|
8 |
__pycache__/
|
9 |
*.pyc
|
10 |
-
*.pkl
|
11 |
-
*.csv
|
12 |
-
*.log
|
13 |
|
14 |
-
# Ignore
|
15 |
-
|
16 |
-
tests/
|
17 |
|
18 |
-
# Ignore
|
19 |
-
|
20 |
-
|
|
|
1 |
# Ignore virtual environments
|
2 |
venv/
|
3 |
+
.venv/
|
|
|
|
|
4 |
|
5 |
+
# Ignore Python artifacts
|
6 |
__pycache__/
|
7 |
*.pyc
|
|
|
|
|
|
|
8 |
|
9 |
+
# Ignore environment files
|
10 |
+
.env
|
|
|
11 |
|
12 |
+
# Ignore Hugging Face artifacts
|
13 |
+
*.lock
|
14 |
+
*.log
|
upload_to_huggingface.py
CHANGED
@@ -1,18 +1,14 @@
|
|
1 |
-
from huggingface_hub import login, create_repo
|
2 |
import os
|
3 |
|
4 |
token = os.getenv("HF_TOKEN")
|
|
|
5 |
|
6 |
-
|
7 |
-
|
8 |
-
repo_id = "NeuralNap/spam-classifier"
|
9 |
-
|
10 |
create_repo(repo_id, private=False, exist_ok=True)
|
11 |
|
12 |
upload_folder(
|
|
|
13 |
repo_id=repo_id,
|
14 |
-
|
15 |
-
repo_type="model",
|
16 |
)
|
17 |
-
|
18 |
-
|
|
|
1 |
+
from huggingface_hub import upload_folder, login, create_repo
|
2 |
import os
|
3 |
|
4 |
token = os.getenv("HF_TOKEN")
|
5 |
+
login(token=token)
|
6 |
|
7 |
+
repo_id = "NeuralNap/spam-classifier"
|
|
|
|
|
|
|
8 |
create_repo(repo_id, private=False, exist_ok=True)
|
9 |
|
10 |
upload_folder(
|
11 |
+
folder_path=".",
|
12 |
repo_id=repo_id,
|
13 |
+
repo_type="model"
|
|
|
14 |
)
|
|
|
|