Spaces:
Sleeping
Sleeping
intergrating download and upload in fork.
Browse files- .gitattributes +1 -0
- MakeItTalk/__pycache__/upload.cpython-37.pyc +3 -0
- MakeItTalk/upload.py +8 -3
.gitattributes
CHANGED
@@ -37,3 +37,4 @@ MakeItTalk/examples/ckpt filter=lfs diff=lfs merge=lfs -text
|
|
37 |
marlenezw/audio-driven-animations/MakeItTalk/AdaptiveWingLoss/images/wflw.png filter=lfs diff=lfs merge=lfs -text
|
38 |
marlenezw/audio-driven-animations/MakeItTalk/AdaptiveWingLoss/images/wflw_table.png filter=lfs diff=lfs merge=lfs -text
|
39 |
marlenezw/audio-driven-animations/MakeItTalk/face_of_art/old/teaser.png filter=lfs diff=lfs merge=lfs -text
|
|
|
|
37 |
marlenezw/audio-driven-animations/MakeItTalk/AdaptiveWingLoss/images/wflw.png filter=lfs diff=lfs merge=lfs -text
|
38 |
marlenezw/audio-driven-animations/MakeItTalk/AdaptiveWingLoss/images/wflw_table.png filter=lfs diff=lfs merge=lfs -text
|
39 |
marlenezw/audio-driven-animations/MakeItTalk/face_of_art/old/teaser.png filter=lfs diff=lfs merge=lfs -text
|
40 |
+
MakeItTalk/__pycache__/upload.cpython-37.pyc filter=lfs diff=lfs merge=lfs -text
|
MakeItTalk/__pycache__/upload.cpython-37.pyc
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:a6e7a110f8f7e422d0f4328d8de05f1b766d59654b5c96a7a6dca8433b85ce5f
|
3 |
+
size 978
|
MakeItTalk/upload.py
CHANGED
@@ -1,10 +1,14 @@
|
|
1 |
-
from huggingface_hub import hf_hub_download
|
2 |
from huggingface_hub import login
|
3 |
from huggingface_hub import HfApi
|
4 |
-
from huggingface_hub import
|
5 |
|
6 |
#not that when passing a file path with "-" in the name add double slashes so it's accpeted by Python
|
7 |
|
|
|
|
|
|
|
|
|
|
|
8 |
|
9 |
def upload_file(token, local_path, repo_path, repo_id, repo_type):
|
10 |
|
@@ -33,4 +37,5 @@ def upload_folder(token, local_path, repo_path, repo_id, repo_type,ignore_patter
|
|
33 |
repo_id=repo_id,
|
34 |
repo_type=repo_type,
|
35 |
ignore_patterns=ignore_patterns,
|
36 |
-
)
|
|
|
|
|
|
1 |
from huggingface_hub import login
|
2 |
from huggingface_hub import HfApi
|
3 |
+
from huggingface_hub import Repository
|
4 |
|
5 |
#not that when passing a file path with "-" in the name add double slashes so it's accpeted by Python
|
6 |
|
7 |
+
def push_code(dir_path, commit_message):
|
8 |
+
repo = Repository(local_dir=dir_path)
|
9 |
+
repo.git_pull()
|
10 |
+
repo.push_to_hub(commit_message=commit_message)
|
11 |
+
|
12 |
|
13 |
def upload_file(token, local_path, repo_path, repo_id, repo_type):
|
14 |
|
|
|
37 |
repo_id=repo_id,
|
38 |
repo_type=repo_type,
|
39 |
ignore_patterns=ignore_patterns,
|
40 |
+
)
|
41 |
+
|