Spaces:
Paused
Paused
Update dl.py
Browse files
dl.py
CHANGED
|
@@ -30,6 +30,8 @@ def show_s(name,token):
|
|
| 30 |
author=name
|
| 31 |
s_ist = (api.list_spaces(author=author))
|
| 32 |
for i,space in enumerate(s_ist):
|
|
|
|
|
|
|
| 33 |
space_ea = space.id.split("/",1)[1]
|
| 34 |
spaces.append(space_ea)
|
| 35 |
#print (space_ea)
|
|
@@ -90,11 +92,11 @@ def show_f(repo,name,token):
|
|
| 90 |
file_list.append(f'{name}.zip')
|
| 91 |
|
| 92 |
s_info=api.space_info(f'{repo}/{name}',files_metadata=True)
|
| 93 |
-
|
| 94 |
with open(f'{uid}-tmp.json','w') as f:
|
| 95 |
-
json.dump(
|
| 96 |
f.close()
|
| 97 |
-
|
| 98 |
return(gr.Dropdown.update(label="Files", choices=[f for f in f_ist],interactive=True),
|
| 99 |
file_list,
|
| 100 |
gr.update(choices=[f for f in f_ist],interactive=True),
|
|
|
|
| 30 |
author=name
|
| 31 |
s_ist = (api.list_spaces(author=author))
|
| 32 |
for i,space in enumerate(s_ist):
|
| 33 |
+
s_info=api.space_info(f'{repo}/{name}',files_metadata=True)
|
| 34 |
+
print(s_info['state'])
|
| 35 |
space_ea = space.id.split("/",1)[1]
|
| 36 |
spaces.append(space_ea)
|
| 37 |
#print (space_ea)
|
|
|
|
| 92 |
file_list.append(f'{name}.zip')
|
| 93 |
|
| 94 |
s_info=api.space_info(f'{repo}/{name}',files_metadata=True)
|
| 95 |
+
'''
|
| 96 |
with open(f'{uid}-tmp.json','w') as f:
|
| 97 |
+
json.dump(s_info,f,indent=4)
|
| 98 |
f.close()
|
| 99 |
+
'''
|
| 100 |
return(gr.Dropdown.update(label="Files", choices=[f for f in f_ist],interactive=True),
|
| 101 |
file_list,
|
| 102 |
gr.update(choices=[f for f in f_ist],interactive=True),
|