Spaces:
Sleeping
Sleeping
Update dl.py
Browse files
dl.py
CHANGED
@@ -215,8 +215,11 @@ def show_all_z(author,token):
|
|
215 |
file_list.append(f'{author}.zip')
|
216 |
yield file_list
|
217 |
|
218 |
-
def pop_buttons(
|
219 |
-
|
|
|
|
|
|
|
220 |
outp = gr.Button("ea")
|
221 |
return gr.update(outp)
|
222 |
|
@@ -258,7 +261,7 @@ with gr.Blocks() as build:
|
|
258 |
test_btn=gr.Button("test button")
|
259 |
test_col = gr.Column()
|
260 |
|
261 |
-
test_btn.click(pop_buttons,
|
262 |
show_all_btn1.click(show_all,[r_name,token],files)
|
263 |
show_all_btn2.click(show_all_z,[r_name,token],files)
|
264 |
|
|
|
215 |
file_list.append(f'{author}.zip')
|
216 |
yield file_list
|
217 |
|
218 |
+
def pop_buttons(repo,name):
|
219 |
+
api = HfApi(token="")
|
220 |
+
f_ist = (api.list_repo_files(repo_id=f'{repo}/{name}', repo_type="space"))
|
221 |
+
print(f_ist)
|
222 |
+
for ea in f_ist:
|
223 |
outp = gr.Button("ea")
|
224 |
return gr.update(outp)
|
225 |
|
|
|
261 |
test_btn=gr.Button("test button")
|
262 |
test_col = gr.Column()
|
263 |
|
264 |
+
test_btn.click(pop_buttons,[r_name,s_name],test_col)
|
265 |
show_all_btn1.click(show_all,[r_name,token],files)
|
266 |
show_all_btn2.click(show_all_z,[r_name,token],files)
|
267 |
|