File size: 628 Bytes
b63b1c9
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
from huggingface_hub import HfApi, HfFolder, Repository

# Authenticate with Hugging Face Hub
api = HfApi()
token = HfFolder.get_token()
if token is None:
    raise ValueError("Hugging Face token is not set. Please authenticate first.")

# Create or clone the private repository using the token
repo = Repository(
    local_dir="DreamVoice",
    clone_from="myshell-ai/DreamVoice",
    use_auth_token=token
)

repo.lfs_track(".pt")
repo.lfs_track(".png")

# Add all changes to git
repo.git_add()

# Commit the changes with a message
repo.git_commit("Initial commit")

# Push the changes to the remote repository
repo.git_push()