File size: 692 Bytes
ef59ecd
 
7885a28
ef59ecd
 
 
7885a28
 
 
 
 
ef59ecd
7885a28
 
f33a68e
e3c56e8
 
 
3ac969b
e3c56e8
3ac969b
 
 
 
e3c56e8
3ac969b
 
e3c56e8
3ac969b
e3c56e8
3ac969b
e3c56e8
3ac969b
 
 
7885a28
ef59ecd
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
from huggingface_hub import login, create_repo, upload_large_folder
import os

token = os.getenv("HF_TOKEN")

login(token=token)  

repo_id = "NeuralNap/spam-classifier" 

create_repo(repo_id, private=False, exist_ok=True)

upload_large_folder(
    repo_id=repo_id,
    folder_path=".",  
    repo_type="model",
    ignore_patterns=[
        "venv",        
        "venv/*",      
        ".env",
        "__pycache__",
        "__pycache__/*",
        "*.pyc",
        "*.pkl",
        "*.ipynb",
        "tests",
        "tests/*",
        ".DS_Store",
        ".vscode",
        ".vscode/*",
        "cache",
        "cache/*",
        ".git",
        ".git/*",
        "*.log"
    ]
)