Omnibus commited on
Commit
121692b
1 Parent(s): 6e57edd

Update dl.py

Browse files
Files changed (1) hide show
  1. dl.py +5 -3
dl.py CHANGED
@@ -31,7 +31,7 @@ def show_s(name,token):
31
  spaces.append(space_ea)
32
  #print (space_ea)
33
  return(gr.Dropdown.update(label="Spaces", choices=[s for s in spaces]),
34
- gr.update(choices=[s for s in spaces]))
35
 
36
  def show_f(repo,name,token):
37
  api = HfApi(token=token)
@@ -86,7 +86,7 @@ def show_f(repo,name,token):
86
 
87
  return(gr.Dropdown.update(label="Files", choices=[f for f in f_ist],interactive=True),
88
  file_list,
89
- gr.update(choices=[f for f in f_ist]))
90
 
91
  def show_f2(repo,name,token):
92
  api = HfApi(token=token)
@@ -274,7 +274,9 @@ with gr.Blocks(css=css) as build:
274
  s_btn.click(show_s,[r_name,token],[s_name,space_radio])
275
  l_btn.click(show_f,[r_name,s_name,token], [f_name, files,file_radio])
276
  f_name.change(show_f_cont,[r_name,s_name,f_name],[r_h,r_t])
277
- #s_name.change(show_f,[r_name,s_name,token],[d_app,files])
 
 
278
 
279
  pass_btn.click(checkp,pass_box,[no,yes])
280
  #inbut.click(build_space,[token,t_name,s_type,m_type,r_type,d_app,d_css],output_html)
 
31
  spaces.append(space_ea)
32
  #print (space_ea)
33
  return(gr.Dropdown.update(label="Spaces", choices=[s for s in spaces]),
34
+ gr.update(choices=[s for s in spaces],interactive=True))
35
 
36
  def show_f(repo,name,token):
37
  api = HfApi(token=token)
 
86
 
87
  return(gr.Dropdown.update(label="Files", choices=[f for f in f_ist],interactive=True),
88
  file_list,
89
+ gr.update(choices=[f for f in f_ist],interactive=True))
90
 
91
  def show_f2(repo,name,token):
92
  api = HfApi(token=token)
 
274
  s_btn.click(show_s,[r_name,token],[s_name,space_radio])
275
  l_btn.click(show_f,[r_name,s_name,token], [f_name, files,file_radio])
276
  f_name.change(show_f_cont,[r_name,s_name,f_name],[r_h,r_t])
277
+
278
+ s_name.change(show_f,[r_name,s_name,token],[d_app,files])
279
+ space_radio.change(show_f,[r_name,s_name,token],[d_app,files])
280
 
281
  pass_btn.click(checkp,pass_box,[no,yes])
282
  #inbut.click(build_space,[token,t_name,s_type,m_type,r_type,d_app,d_css],output_html)