pandaphd commited on
Commit
94080d2
·
1 Parent(s): fe68716

fix version

Browse files
Files changed (1) hide show
  1. app.py +2 -2
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/api/spaces/{MODEL_REPO}/tree/{BRANCH}/{path}"
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/spaces/{MODEL_REPO}/resolve/{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
 
 
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