File size: 777 Bytes
52c8e55
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
from huggingface_hub import HfApi

REPO = "Safeeq/pycoder-gguf"
FILES = [
    ".gitattributes",
    "LICENSE",
    "README.md",
    "Modelfile",
    "common.py",
    "make_dataset.py",
    "merge.py",
    "pycoder-q8_0.gguf",
    "requirements.txt",
    "run_pycoder.py",
    "test_model.py",
    "train.py",
    "upload.py",
]


def main():
    api = HfApi()
    api.create_repo(REPO, repo_type="model", private=False, exist_ok=True)
    api.upload_folder(
        folder_path=".",
        repo_id=REPO,
        repo_type="model",
        allow_patterns=FILES,
        commit_message="Publish complete PyCoder model and usage files",
    )
    print(f"Published files to https://huggingface.co/{REPO}")


if __name__ == "__main__":
    main()