Sam Chaudry commited on
Commit
a75c01f
·
verified ·
1 Parent(s): ee4b122

Upload folder using huggingface_hub

Browse files
Files changed (2) hide show
  1. .huggingfaceignore +7 -13
  2. upload_to_huggingface.py +5 -9
.huggingfaceignore CHANGED
@@ -1,20 +1,14 @@
1
  # Ignore virtual environments
2
  venv/
3
- .env/
4
- __pycache__/
5
- *.pyc
6
 
7
- # Ignore cache and large files
8
  __pycache__/
9
  *.pyc
10
- *.pkl
11
- *.csv
12
- *.log
13
 
14
- # Ignore notebooks and test files
15
- *.ipynb
16
- tests/
17
 
18
- # Ignore system or IDE files
19
- .DS_Store
20
- .vscode/
 
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, upload_folder
2
  import os
3
 
4
  token = os.getenv("HF_TOKEN")
 
5
 
6
- login(token=token)
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
- folder_path=".",
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
  )