Omnibus commited on
Commit
881c58c
·
1 Parent(s): 4571c44

Update dl.py

Browse files
Files changed (1) hide show
  1. dl.py +6 -3
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(inp):
219
- for ea in inp:
 
 
 
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,f_name,test_col)
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