Update app.py
Browse files
app.py
CHANGED
|
@@ -93,9 +93,12 @@ def get_f(r_name,spaces,token):
|
|
| 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 |
with zipfile.ZipFile(f'{space}.zip', 'w') as new_zip:
|
|
|
|
| 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 |
+
zz_file=open(f'{uid}/{file}','w')
|
| 97 |
r = requests.get(f'https://huggingface.co/spaces/{r_name}/{space}/raw/main/{file}')
|
| 98 |
t_file.write(r.text)
|
| 99 |
t_file.close()
|
| 100 |
+
zz_file.write(r.text)
|
| 101 |
+
zz_file.close()
|
| 102 |
files_b.append(f'{uid}/{space}-{file}')
|
| 103 |
print(file)
|
| 104 |
with zipfile.ZipFile(f'{space}.zip', 'w') as new_zip:
|