xp3857 commited on
Commit
7fa990f
·
1 Parent(s): a430759

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -78,14 +78,14 @@ def get_f(r_name,spaces,token):
78
  api = HfApi(token=token)
79
  spaces_b=[]
80
  files_b=[]
81
- for b, space in enumerate(spaces):
82
  print(f"a-{b}")
83
  print(spaces[b])
84
- print(space)
85
- f_ist = (api.list_repo_files(repo_id=f'{r_name}/{space}', repo_type="space"))
86
  for i in f_ist:
87
  print("b")
88
- r = requests.get(f'https://huggingface.co/spaces/{r_name}/{space[b]}/raw/main/{f_ist[i]}')
89
  print(f_ist[i])
90
  #with zipfile.ZipFile('new.zip', 'w') as new_zip:
91
  # new_zip.write('spam.txt', compress_type=zipfile.ZIP_DEFLATED)
 
78
  api = HfApi(token=token)
79
  spaces_b=[]
80
  files_b=[]
81
+ for b in spaces:
82
  print(f"a-{b}")
83
  print(spaces[b])
84
+ #print(space)
85
+ f_ist = (api.list_repo_files(repo_id=f'{r_name}/{spaces[b]}', repo_type="space"))
86
  for i in f_ist:
87
  print("b")
88
+ r = requests.get(f'https://huggingface.co/spaces/{r_name}/{spaces[b]}/raw/main/{f_ist[i]}')
89
  print(f_ist[i])
90
  #with zipfile.ZipFile('new.zip', 'w') as new_zip:
91
  # new_zip.write('spam.txt', compress_type=zipfile.ZIP_DEFLATED)