xp3857 commited on
Commit
5652deb
·
1 Parent(s): 9c76c30

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -92,16 +92,16 @@ def get_f(r_name,spaces,token):
92
  print("###############")
93
  f_ist = (api.list_repo_files(repo_id=f'{r_name}/{space}', repo_type="space"))
94
  for file in f_ist:
95
- t_file=open(f'{uid}/{file}','w')
96
  r = requests.get(f'https://huggingface.co/spaces/{r_name}/{space}/raw/main/{file}')
97
  t_file.write(r.text)
98
  t_file.close()
99
- files_b.append(f'{uid}/{file}')
100
  print(file)
101
- spaces_b.append(files_b)
102
  #with zipfile.ZipFile('new.zip', 'w') as new_zip:
103
  # new_zip.write('spam.txt', compress_type=zipfile.ZIP_DEFLATED)
104
- return(spaces_b)
105
 
106
  def build_space(token,r_name,s_name,d_app,uu):
107
  if token==None or token=="":
 
92
  print("###############")
93
  f_ist = (api.list_repo_files(repo_id=f'{r_name}/{space}', repo_type="space"))
94
  for file in f_ist:
95
+ t_file=open(f'{uid}/{space}-{file}','w')
96
  r = requests.get(f'https://huggingface.co/spaces/{r_name}/{space}/raw/main/{file}')
97
  t_file.write(r.text)
98
  t_file.close()
99
+ files_b.append(f'{uid}/{space}-{file}')
100
  print(file)
101
+ #spaces_b.append(files_b)
102
  #with zipfile.ZipFile('new.zip', 'w') as new_zip:
103
  # new_zip.write('spam.txt', compress_type=zipfile.ZIP_DEFLATED)
104
+ return(files_b)
105
 
106
  def build_space(token,r_name,s_name,d_app,uu):
107
  if token==None or token=="":