Spaces:
Running
on
Zero
Running
on
Zero
fix version
Browse files
app.py
CHANGED
@@ -17,7 +17,7 @@ def download_hf_folder():
|
|
17 |
os.makedirs(LOCAL_DIR, exist_ok=True)
|
18 |
|
19 |
def get_file_list(path=""):
|
20 |
-
api_url = f"https://huggingface.co/
|
21 |
try:
|
22 |
response = requests.get(api_url, timeout=10)
|
23 |
response.raise_for_status()
|
@@ -26,7 +26,7 @@ def download_hf_folder():
|
|
26 |
raise RuntimeError(f"Failed to get file list: {str(e)}")
|
27 |
|
28 |
def download_file(remote_path):
|
29 |
-
url = f"https://huggingface.co/
|
30 |
local_path = os.path.join(LOCAL_DIR, remote_path)
|
31 |
os.makedirs(os.path.dirname(local_path), exist_ok=True)
|
32 |
|
|
|
17 |
os.makedirs(LOCAL_DIR, exist_ok=True)
|
18 |
|
19 |
def get_file_list(path=""):
|
20 |
+
api_url = f"https://huggingface.co/{MODEL_REPO}/tree/{BRANCH}/{path}"
|
21 |
try:
|
22 |
response = requests.get(api_url, timeout=10)
|
23 |
response.raise_for_status()
|
|
|
26 |
raise RuntimeError(f"Failed to get file list: {str(e)}")
|
27 |
|
28 |
def download_file(remote_path):
|
29 |
+
url = f"https://huggingface.co/{MODEL_REPO}/tree/{BRANCH}/{remote_path}"
|
30 |
local_path = os.path.join(LOCAL_DIR, remote_path)
|
31 |
os.makedirs(os.path.dirname(local_path), exist_ok=True)
|
32 |
|