lyx97 commited on
Commit
dd3b997
·
1 Parent(s): e99df10

commit files to HF hub

Browse files
Files changed (1) hide show
  1. tmp.py +14 -0
tmp.py ADDED
@@ -0,0 +1,14 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ from huggingface_hub import Repository, HfApi
2
+ import os
3
+
4
+ hf_token = os.getenv('HF_TOKEN')
5
+ api = HfApi(token=hf_token)
6
+ repo = Repository(
7
+ local_dir=".",
8
+ clone_from="https://huggingface.co/spaces/lyx97/TempCompass",
9
+ use_auth_token=hf_token,
10
+ )
11
+
12
+ repo.git_add('app.py')
13
+ repo.git_commit('update')
14
+ repo.push_to_hub()