Spaces:
Sleeping
Sleeping
Upload app.py
Browse files
app.py
CHANGED
@@ -1,9 +1,10 @@
|
|
1 |
-
import
|
2 |
import os
|
3 |
-
from git_commd import GitCommandWrapper
|
4 |
from typing import List, Optional
|
5 |
-
import logging
|
6 |
|
|
|
|
|
|
|
7 |
|
8 |
HF_TOKEN = os.environ["HF_TOKEN"] if "HF_TOKEN" in os.environ else ""
|
9 |
WiseModel_TOKEN = os.environ["WM_TOKEN"] if "WM_TOKEN" in os.environ else ""
|
@@ -72,7 +73,7 @@ def push_to_wiseModel(
|
|
72 |
repo_dir = f"./{cache_dir}/{repo_name}"
|
73 |
os.makedirs(repo_dir, exist_ok=True)
|
74 |
source_dir = f"./{cache_dir}/hf/{hf_repo_id}"
|
75 |
-
move_file(source_dir, repo_dir, excludes=[".
|
76 |
gitCmd.add(repo_dir, all_files=True)
|
77 |
gitCmd.commit(repo_dir, message="commit from hf to wisemodel")
|
78 |
gitCmd.push(repo_dir, token, url, branch, branch)
|
|
|
1 |
+
import logging
|
2 |
import os
|
|
|
3 |
from typing import List, Optional
|
|
|
4 |
|
5 |
+
import gradio as gr
|
6 |
+
|
7 |
+
from git_commd import GitCommandWrapper
|
8 |
|
9 |
HF_TOKEN = os.environ["HF_TOKEN"] if "HF_TOKEN" in os.environ else ""
|
10 |
WiseModel_TOKEN = os.environ["WM_TOKEN"] if "WM_TOKEN" in os.environ else ""
|
|
|
73 |
repo_dir = f"./{cache_dir}/{repo_name}"
|
74 |
os.makedirs(repo_dir, exist_ok=True)
|
75 |
source_dir = f"./{cache_dir}/hf/{hf_repo_id}"
|
76 |
+
move_file(source_dir, repo_dir, excludes=[".gitattributes"])
|
77 |
gitCmd.add(repo_dir, all_files=True)
|
78 |
gitCmd.commit(repo_dir, message="commit from hf to wisemodel")
|
79 |
gitCmd.push(repo_dir, token, url, branch, branch)
|