Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -51,7 +51,9 @@ def get_all_files(owner, repo, path="", is_hf=False):
|
|
51 |
files.append(item)
|
52 |
elif item['type'] == 'dir':
|
53 |
files.extend(get_all_files(owner, repo, item['path'], is_hf))
|
|
|
54 |
return files
|
|
|
55 |
except Exception as e:
|
56 |
return None
|
57 |
|
@@ -100,7 +102,7 @@ def get_hf_files(repo,name):
|
|
100 |
file = open(f'{name}/{f_name}','wb')
|
101 |
file.write(r.content)
|
102 |
file.close()
|
103 |
-
file_list.append({"path":
|
104 |
print(file_list)
|
105 |
return file_list
|
106 |
|
|
|
51 |
files.append(item)
|
52 |
elif item['type'] == 'dir':
|
53 |
files.extend(get_all_files(owner, repo, item['path'], is_hf))
|
54 |
+
print(files)
|
55 |
return files
|
56 |
+
|
57 |
except Exception as e:
|
58 |
return None
|
59 |
|
|
|
102 |
file = open(f'{name}/{f_name}','wb')
|
103 |
file.write(r.content)
|
104 |
file.close()
|
105 |
+
file_list.append({"path":f'{name}/{f_name}'})
|
106 |
print(file_list)
|
107 |
return file_list
|
108 |
|