Omnibus commited on
Commit
1c286ba
1 Parent(s): 291a212

Update dl.py

Browse files
Files changed (1) hide show
  1. dl.py +4 -5
dl.py CHANGED
@@ -24,12 +24,12 @@ def show_s(name,token):
24
  for i,space in enumerate(s_ist):
25
  space_ea = space.id.split("/",1)[1]
26
  spaces.append(space_ea)
27
- print (space_ea)
28
  return(gr.Dropdown.update(label="Spaces", choices=[s for s in spaces]))
29
 
30
  def show_f(repo,name,token):
31
  api = HfApi(token=token)
32
- f_ist = (api.list_repo_files(repo_id=f'{repo}/{name[0]}', repo_type="space"))
33
  print (f_ist)
34
  file_list = []
35
  file_out = []
@@ -147,7 +147,6 @@ with gr.Blocks() as build:
147
  pass_btn=gr.Button()
148
  with gr.Box(visible=True) as yes:
149
  with gr.Row():
150
- gr.Column(scale=1)
151
  with gr.Column(scale=3):
152
  with gr.Group():
153
  with gr.Row():
@@ -164,8 +163,8 @@ with gr.Blocks() as build:
164
  show_all_btn1 = gr.Button("Load All 1")
165
  show_all_btn2 = gr.Button("Load All 2")
166
 
167
- gr.Column(scale=1)
168
- files=gr.File(file_count="directory")
169
  with gr.Row():
170
  r_t=gr.Textbox(max_lines=100)
171
  m_t=gr.Textbox(max_lines=100)
 
24
  for i,space in enumerate(s_ist):
25
  space_ea = space.id.split("/",1)[1]
26
  spaces.append(space_ea)
27
+ #print (space_ea)
28
  return(gr.Dropdown.update(label="Spaces", choices=[s for s in spaces]))
29
 
30
  def show_f(repo,name,token):
31
  api = HfApi(token=token)
32
+ f_ist = (api.list_repo_files(repo_id=f'{repo}/{name}', repo_type="space"))
33
  print (f_ist)
34
  file_list = []
35
  file_out = []
 
147
  pass_btn=gr.Button()
148
  with gr.Box(visible=True) as yes:
149
  with gr.Row():
 
150
  with gr.Column(scale=3):
151
  with gr.Group():
152
  with gr.Row():
 
163
  show_all_btn1 = gr.Button("Load All 1")
164
  show_all_btn2 = gr.Button("Load All 2")
165
 
166
+ with gr.Column(scale=1):
167
+ files=gr.File(file_count="directory")
168
  with gr.Row():
169
  r_t=gr.Textbox(max_lines=100)
170
  m_t=gr.Textbox(max_lines=100)