Omnibus commited on
Commit
58977ed
1 Parent(s): 7f5d545

Update dl.py

Browse files
Files changed (1) hide show
  1. dl.py +12 -10
dl.py CHANGED
@@ -141,7 +141,7 @@ def show_f_cont(repo,name,file,token):
141
  else:
142
  pass
143
  html_text += '</div>\n</body>\n</html>'
144
- return(html_text,out_text)
145
 
146
 
147
 
@@ -234,22 +234,24 @@ with gr.Blocks(css=css) as build:
234
  pass_box=gr.Textbox()
235
  pass_btn=gr.Button()
236
  with gr.Box(visible=True) as yes:
 
 
 
 
237
  with gr.Tab("View 1"):
238
  with gr.Row():
239
- with gr.Column():
240
  with gr.Group():
241
  space_radio=gr.Radio(label="Spaces",choices=[])
242
- with gr.Column():
243
  file_radio=gr.Radio(label="Files",choices=[])
244
- with gr.Column():
245
  file_contents=gr.HTML()
246
  with gr.Tab("View 2"):
247
  with gr.Row():
248
  with gr.Column(scale=2):
249
  with gr.Group():
250
- with gr.Row():
251
- r_name = gr.Textbox(label="Repo")
252
- token = gr.Textbox(label="auth")
253
  with gr.Row():
254
  s_btn = gr.Button("Show Spaces")
255
  with gr.Row():
@@ -261,7 +263,6 @@ with gr.Blocks(css=css) as build:
261
  show_all_btn1 = gr.Button("Load All 1")
262
  show_all_btn2 = gr.Button("Load All 2")
263
  with gr.Box():
264
-
265
  r_h=gr.HTML()
266
  with gr.Column(scale=1):
267
  files=gr.File(file_count="directory")
@@ -275,11 +276,12 @@ with gr.Blocks(css=css) as build:
275
 
276
  s_btn.click(show_s,[r_name,token],[s_name,space_radio])
277
  l_btn.click(show_f,[r_name,s_name,token], [f_name, files,file_radio])
278
- f_name.change(show_f_cont,[r_name,s_name,f_name],[r_h,r_t])
279
 
280
  #s_name.change(show_f,[r_name,s_name,token],[d_app,files])
281
  space_radio.change(show_f,[r_name,space_radio,token],[f_name, files,file_radio])
282
-
 
283
  pass_btn.click(checkp,pass_box,[no,yes])
284
  #inbut.click(build_space,[token,t_name,s_type,m_type,r_type,d_app,d_css],output_html)
285
  build.queue(concurrency_count=10).launch(show_api=False)
 
141
  else:
142
  pass
143
  html_text += '</div>\n</body>\n</html>'
144
+ return(html_text)
145
 
146
 
147
 
 
234
  pass_box=gr.Textbox()
235
  pass_btn=gr.Button()
236
  with gr.Box(visible=True) as yes:
237
+ with gr.Box():
238
+ with gr.Row():
239
+ r_name = gr.Textbox(label="Repo")
240
+ token = gr.Textbox(label="auth")
241
  with gr.Tab("View 1"):
242
  with gr.Row():
243
+ with gr.Column(scale=1):
244
  with gr.Group():
245
  space_radio=gr.Radio(label="Spaces",choices=[])
246
+ with gr.Column(scale=1):
247
  file_radio=gr.Radio(label="Files",choices=[])
248
+ with gr.Column(scale=2):
249
  file_contents=gr.HTML()
250
  with gr.Tab("View 2"):
251
  with gr.Row():
252
  with gr.Column(scale=2):
253
  with gr.Group():
254
+
 
 
255
  with gr.Row():
256
  s_btn = gr.Button("Show Spaces")
257
  with gr.Row():
 
263
  show_all_btn1 = gr.Button("Load All 1")
264
  show_all_btn2 = gr.Button("Load All 2")
265
  with gr.Box():
 
266
  r_h=gr.HTML()
267
  with gr.Column(scale=1):
268
  files=gr.File(file_count="directory")
 
276
 
277
  s_btn.click(show_s,[r_name,token],[s_name,space_radio])
278
  l_btn.click(show_f,[r_name,s_name,token], [f_name, files,file_radio])
279
+ f_name.change(show_f_cont,[r_name,s_name,f_name],[r_h])
280
 
281
  #s_name.change(show_f,[r_name,s_name,token],[d_app,files])
282
  space_radio.change(show_f,[r_name,space_radio,token],[f_name, files,file_radio])
283
+ file_radio.change(show_f_cont,[r_name,s_name,file_radio],[file_contents])
284
+
285
  pass_btn.click(checkp,pass_box,[no,yes])
286
  #inbut.click(build_space,[token,t_name,s_type,m_type,r_type,d_app,d_css],output_html)
287
  build.queue(concurrency_count=10).launch(show_api=False)