File size: 321 Bytes
dd3b997
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
from huggingface_hub import Repository, HfApi
import os

hf_token = os.getenv('HF_TOKEN')
api = HfApi(token=hf_token)
repo = Repository(
    local_dir=".",
    clone_from="https://huggingface.co/spaces/lyx97/TempCompass",
    use_auth_token=hf_token,
)

repo.git_add('app.py')
repo.git_commit('update')
repo.push_to_hub()