Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -36,8 +36,8 @@ def show_s(name,token):
|
|
36 |
spaces.append(space_ea)
|
37 |
#print (space_ea)
|
38 |
return(gr.Dropdown.update(label="Spaces", choices=[s for s in spaces]),
|
39 |
-
gr.update(choices=[s for s in spaces],interactive=True),
|
40 |
gr.update(choices=[s for s in spaces],interactive=True))
|
|
|
41 |
|
42 |
def show_f(repo,name,token):
|
43 |
api = HfApi(token=token)
|
@@ -334,6 +334,7 @@ with gr.Blocks(css=css) as build:
|
|
334 |
file_radio=gr.Radio(label="Files",choices=[])
|
335 |
with gr.Column(scale=3):
|
336 |
file_contents=gr.HTML()
|
|
|
337 |
with gr.Tab("View 2"):
|
338 |
with gr.Row():
|
339 |
with gr.Column(scale=2):
|
@@ -348,7 +349,7 @@ with gr.Blocks(css=css) as build:
|
|
348 |
show_all_btn2 = gr.Button("Load All 2",visible=False)
|
349 |
uu=gr.Textbox(visible=False)
|
350 |
file_frame=gr.HTML()
|
351 |
-
|
352 |
with gr.Tab("View 3"):
|
353 |
with gr.Row():
|
354 |
with gr.Column(scale=1):
|
@@ -368,23 +369,24 @@ with gr.Blocks(css=css) as build:
|
|
368 |
del_message_box=gr.HTML()
|
369 |
gr.Column()
|
370 |
sure_check=gr.Textbox(visible=False,value="")
|
|
|
371 |
|
372 |
|
|
|
|
|
|
|
373 |
|
374 |
-
|
375 |
-
delete_checked_btn.click(ru_sure_fn,None,sure_row)
|
376 |
-
ru_sure_btn.click(delete_checked,[ru_sure_box,r_name,space_check,token],[del_message_box,sure_row]).then(show_s,[r_name,token],[s_name,space_radio,space_check])
|
377 |
-
|
378 |
-
space_check.change(update_checked_message,space_check,message_box)
|
379 |
|
380 |
|
381 |
-
show_all_btn1.click(show_all,[r_name,token],files)
|
382 |
-
show_all_btn2.click(show_all_z,[r_name,token],files)
|
383 |
|
384 |
-
s_btn.click(show_s,[r_name,token],[s_name,space_radio,space_check])
|
|
|
385 |
l_btn.click(show_f,[r_name,s_name,token], [f_name, files,file_radio])
|
386 |
#f_name.change(show_f_frame,[r_name,s_name,f_name],[file_frame])
|
387 |
-
s_name.change(show_f_frame2,[r_name,s_name,f_name],[file_frame])
|
388 |
|
389 |
#s_name.change(show_f,[r_name,s_name,token],[d_app,files])
|
390 |
space_radio.change(show_f,[r_name,space_radio,token],[f_name, files,file_radio,space_info_json])
|
@@ -392,4 +394,4 @@ with gr.Blocks(css=css) as build:
|
|
392 |
|
393 |
pass_btn.click(checkp,pass_box,[no,yes])
|
394 |
#inbut.click(build_space,[token,t_name,s_type,m_type,r_type,d_app,d_css],output_html)
|
395 |
-
build.queue(
|
|
|
36 |
spaces.append(space_ea)
|
37 |
#print (space_ea)
|
38 |
return(gr.Dropdown.update(label="Spaces", choices=[s for s in spaces]),
|
|
|
39 |
gr.update(choices=[s for s in spaces],interactive=True))
|
40 |
+
#gr.update(choices=[s for s in spaces],interactive=True))
|
41 |
|
42 |
def show_f(repo,name,token):
|
43 |
api = HfApi(token=token)
|
|
|
334 |
file_radio=gr.Radio(label="Files",choices=[])
|
335 |
with gr.Column(scale=3):
|
336 |
file_contents=gr.HTML()
|
337 |
+
'''
|
338 |
with gr.Tab("View 2"):
|
339 |
with gr.Row():
|
340 |
with gr.Column(scale=2):
|
|
|
349 |
show_all_btn2 = gr.Button("Load All 2",visible=False)
|
350 |
uu=gr.Textbox(visible=False)
|
351 |
file_frame=gr.HTML()
|
352 |
+
|
353 |
with gr.Tab("View 3"):
|
354 |
with gr.Row():
|
355 |
with gr.Column(scale=1):
|
|
|
369 |
del_message_box=gr.HTML()
|
370 |
gr.Column()
|
371 |
sure_check=gr.Textbox(visible=False,value="")
|
372 |
+
'''
|
373 |
|
374 |
|
375 |
+
#dl_checked_btn.click(dl_checked_fn,[r_name,space_check,token],files)
|
376 |
+
#delete_checked_btn.click(ru_sure_fn,None,sure_row)
|
377 |
+
#ru_sure_btn.click(delete_checked,[ru_sure_box,r_name,space_check,token],[del_message_box,sure_row]).then(show_s,[r_name,token],[s_name,space_radio,space_check])
|
378 |
|
379 |
+
#space_check.change(update_checked_message,space_check,message_box)
|
|
|
|
|
|
|
|
|
380 |
|
381 |
|
382 |
+
#show_all_btn1.click(show_all,[r_name,token],files)
|
383 |
+
#show_all_btn2.click(show_all_z,[r_name,token],files)
|
384 |
|
385 |
+
#s_btn.click(show_s,[r_name,token],[s_name,space_radio,space_check])
|
386 |
+
s_btn.click(show_s,[r_name,token],[s_name,space_radio])
|
387 |
l_btn.click(show_f,[r_name,s_name,token], [f_name, files,file_radio])
|
388 |
#f_name.change(show_f_frame,[r_name,s_name,f_name],[file_frame])
|
389 |
+
#s_name.change(show_f_frame2,[r_name,s_name,f_name],[file_frame])
|
390 |
|
391 |
#s_name.change(show_f,[r_name,s_name,token],[d_app,files])
|
392 |
space_radio.change(show_f,[r_name,space_radio,token],[f_name, files,file_radio,space_info_json])
|
|
|
394 |
|
395 |
pass_btn.click(checkp,pass_box,[no,yes])
|
396 |
#inbut.click(build_space,[token,t_name,s_type,m_type,r_type,d_app,d_css],output_html)
|
397 |
+
build.queue(default_concurrency_limit=10).launch(show_api=False)
|