Spaces:
Running
Running
Update dl.py
Browse files
dl.py
CHANGED
@@ -162,6 +162,10 @@ def show_f_frame(repo,name,file,token):
|
|
162 |
file_url=f'https://huggingface.co/spaces/{repo}/{name}/blob/main/{file}'
|
163 |
out=f"""<div><iframe src='{file_url}' height='1200px' width='100%'></iframe>"""
|
164 |
return out
|
|
|
|
|
|
|
|
|
165 |
def show_all(author,token):
|
166 |
spaces=[]
|
167 |
api = HfApi(token=token)
|
@@ -379,7 +383,8 @@ with gr.Blocks(css=css) as build:
|
|
379 |
|
380 |
s_btn.click(show_s,[r_name,token],[s_name,space_radio,space_check])
|
381 |
l_btn.click(show_f,[r_name,s_name,token], [f_name, files,file_radio])
|
382 |
-
f_name.change(show_f_frame,[r_name,s_name,f_name],[file_frame])
|
|
|
383 |
|
384 |
#s_name.change(show_f,[r_name,s_name,token],[d_app,files])
|
385 |
space_radio.change(show_f,[r_name,space_radio,token],[f_name, files,file_radio,space_info_json])
|
|
|
162 |
file_url=f'https://huggingface.co/spaces/{repo}/{name}/blob/main/{file}'
|
163 |
out=f"""<div><iframe src='{file_url}' height='1200px' width='100%'></iframe>"""
|
164 |
return out
|
165 |
+
def show_f_frame2(repo,name,file,token):
|
166 |
+
file_url=f'https://huggingface.co/spaces/{repo}/{name}'
|
167 |
+
out=f"""<div><iframe src='{file_url}' height='1200px' width='100%'></iframe>"""
|
168 |
+
return out
|
169 |
def show_all(author,token):
|
170 |
spaces=[]
|
171 |
api = HfApi(token=token)
|
|
|
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])
|