Update app.py
Browse files
app.py
CHANGED
|
@@ -81,20 +81,17 @@ def get_f(r_name,spaces,token):
|
|
| 81 |
api = HfApi(token=token)
|
| 82 |
spaces_b=[]
|
| 83 |
files_b=[]
|
| 84 |
-
spaces=spaces.replace("[","").replace("]","").replace("'","")
|
| 85 |
spaces=spaces.split(",")
|
| 86 |
print (spaces)
|
| 87 |
|
| 88 |
-
for
|
| 89 |
-
print(
|
| 90 |
-
print(
|
| 91 |
-
|
| 92 |
-
|
| 93 |
-
|
| 94 |
-
|
| 95 |
-
print("b")
|
| 96 |
-
r = requests.get(f'https://huggingface.co/spaces/{r_name}/{sp}/raw/main/{f}')
|
| 97 |
-
print(f)
|
| 98 |
#with zipfile.ZipFile('new.zip', 'w') as new_zip:
|
| 99 |
# new_zip.write('spam.txt', compress_type=zipfile.ZIP_DEFLATED)
|
| 100 |
|
|
|
|
| 81 |
api = HfApi(token=token)
|
| 82 |
spaces_b=[]
|
| 83 |
files_b=[]
|
| 84 |
+
spaces=spaces.replace("[","").replace("]","").replace("'","").replace(" ","")
|
| 85 |
spaces=spaces.split(",")
|
| 86 |
print (spaces)
|
| 87 |
|
| 88 |
+
for space in spaces:
|
| 89 |
+
print(space)
|
| 90 |
+
print("###############")
|
| 91 |
+
f_ist = (api.list_repo_files(repo_id=f'{r_name}/{space}', repo_type="space"))
|
| 92 |
+
for file in f_ist:
|
| 93 |
+
r = requests.get(f'https://huggingface.co/spaces/{r_name}/{space}/raw/main/{file}')
|
| 94 |
+
print(file)
|
|
|
|
|
|
|
|
|
|
| 95 |
#with zipfile.ZipFile('new.zip', 'w') as new_zip:
|
| 96 |
# new_zip.write('spam.txt', compress_type=zipfile.ZIP_DEFLATED)
|
| 97 |
|