Spaces:
Sleeping
Sleeping
Update dl.py
Browse files
dl.py
CHANGED
|
@@ -90,7 +90,9 @@ def show_f(repo,name,token):
|
|
| 90 |
|
| 91 |
return(gr.Dropdown.update(label="Files", choices=[f for f in f_ist],interactive=True),
|
| 92 |
file_list,
|
| 93 |
-
gr.update(choices=[f for f in f_ist],interactive=True)
|
|
|
|
|
|
|
| 94 |
|
| 95 |
def show_f2(repo,name,token):
|
| 96 |
api = HfApi(token=token)
|
|
@@ -285,6 +287,8 @@ with gr.Blocks(css=css) as build:
|
|
| 285 |
space_radio=gr.Radio(label="Spaces",choices=[])
|
| 286 |
with gr.Column(scale=1):
|
| 287 |
file_radio=gr.Radio(label="Files",choices=[])
|
|
|
|
|
|
|
| 288 |
with gr.Column(scale=2):
|
| 289 |
file_contents=gr.HTML()
|
| 290 |
with gr.Tab("View 2"):
|
|
@@ -325,7 +329,7 @@ with gr.Blocks(css=css) as build:
|
|
| 325 |
f_name.change(show_f_cont,[r_name,s_name,f_name],[r_h])
|
| 326 |
|
| 327 |
#s_name.change(show_f,[r_name,s_name,token],[d_app,files])
|
| 328 |
-
space_radio.change(show_f,[r_name,space_radio,token],[f_name, files,file_radio])
|
| 329 |
file_radio.change(show_f_cont,[r_name,space_radio,file_radio,token],[file_contents])
|
| 330 |
|
| 331 |
pass_btn.click(checkp,pass_box,[no,yes])
|
|
|
|
| 90 |
|
| 91 |
return(gr.Dropdown.update(label="Files", choices=[f for f in f_ist],interactive=True),
|
| 92 |
file_list,
|
| 93 |
+
gr.update(choices=[f for f in f_ist],interactive=True),
|
| 94 |
+
api.space_info(f'{repo}/{name}',file_metadata=True),
|
| 95 |
+
api.get_space_runtim(f'{repo}/{name}'))
|
| 96 |
|
| 97 |
def show_f2(repo,name,token):
|
| 98 |
api = HfApi(token=token)
|
|
|
|
| 287 |
space_radio=gr.Radio(label="Spaces",choices=[])
|
| 288 |
with gr.Column(scale=1):
|
| 289 |
file_radio=gr.Radio(label="Files",choices=[])
|
| 290 |
+
space_info_json=gr.JSON()
|
| 291 |
+
space_runtime_json=gr.JSON()
|
| 292 |
with gr.Column(scale=2):
|
| 293 |
file_contents=gr.HTML()
|
| 294 |
with gr.Tab("View 2"):
|
|
|
|
| 329 |
f_name.change(show_f_cont,[r_name,s_name,f_name],[r_h])
|
| 330 |
|
| 331 |
#s_name.change(show_f,[r_name,s_name,token],[d_app,files])
|
| 332 |
+
space_radio.change(show_f,[r_name,space_radio,token],[f_name, files,file_radio,space_info_json,space_runtime_json])
|
| 333 |
file_radio.change(show_f_cont,[r_name,space_radio,file_radio,token],[file_contents])
|
| 334 |
|
| 335 |
pass_btn.click(checkp,pass_box,[no,yes])
|