Omnibus commited on
Commit
803c22c
1 Parent(s): 2202065

Update dl.py

Browse files
Files changed (1) hide show
  1. dl.py +14 -8
dl.py CHANGED
@@ -215,13 +215,7 @@ def show_all_z(author,token):
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(gr.Button("ea"))
225
 
226
  def checkp(p):
227
  if p == o:
@@ -260,7 +254,19 @@ with gr.Blocks() as build:
260
  uu=gr.Textbox(visible=False)
261
  test_btn=gr.Button("test button")
262
  test_col = gr.Group()
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)
 
215
  file_list.append(f'{author}.zip')
216
  yield file_list
217
 
218
+
 
 
 
 
 
 
219
 
220
  def checkp(p):
221
  if p == o:
 
254
  uu=gr.Textbox(visible=False)
255
  test_btn=gr.Button("test button")
256
  test_col = gr.Group()
257
+
258
+ def pop_buttons(repo,name):
259
+ api = HfApi(token="")
260
+ f_ist = (api.list_repo_files(repo_id=f'{repo}/{name}', repo_type="space"))
261
+ print(f_ist)
262
+ for ea in f_ist:
263
+ outp = gr.Button("ea")
264
+
265
+ children = test_col.children
266
+ return gr.Row.update(children=children.append(gr.Audio()))
267
+
268
+
269
+
270
  test_btn.click(pop_buttons,[r_name,s_name],test_col)
271
  show_all_btn1.click(show_all,[r_name,token],files)
272
  show_all_btn2.click(show_all_z,[r_name,token],files)