Spaces:
Running
Running
Update dl.py
Browse files
dl.py
CHANGED
@@ -133,7 +133,8 @@ def show_f_cont(repo,name,file,token):
|
|
133 |
is_im=True
|
134 |
else:
|
135 |
pass
|
136 |
-
if is_im==False:
|
|
|
137 |
r = requests.get(f'https://huggingface.co/spaces/{repo}/{name}/raw/main/{file}')
|
138 |
text=r.text
|
139 |
html_text += f'<pre style="text-wrap:pretty;">{text}</pre>\n'
|
@@ -280,7 +281,7 @@ with gr.Blocks(css=css) as build:
|
|
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,
|
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)
|
|
|
133 |
is_im=True
|
134 |
else:
|
135 |
pass
|
136 |
+
if is_im==False:
|
137 |
+
print(f'https://huggingface.co/spaces/{repo}/{name}/raw/main/{file}')
|
138 |
r = requests.get(f'https://huggingface.co/spaces/{repo}/{name}/raw/main/{file}')
|
139 |
text=r.text
|
140 |
html_text += f'<pre style="text-wrap:pretty;">{text}</pre>\n'
|
|
|
281 |
|
282 |
#s_name.change(show_f,[r_name,s_name,token],[d_app,files])
|
283 |
space_radio.change(show_f,[r_name,space_radio,token],[f_name, files,file_radio])
|
284 |
+
file_radio.change(show_f_cont,[r_name,space_radio,file_radio,token],[file_contents])
|
285 |
|
286 |
pass_btn.click(checkp,pass_box,[no,yes])
|
287 |
#inbut.click(build_space,[token,t_name,s_type,m_type,r_type,d_app,d_css],output_html)
|