Omnibus commited on
Commit
a729385
1 Parent(s): f1c73b6

Update dl.py

Browse files
Files changed (1) hide show
  1. dl.py +5 -1
dl.py CHANGED
@@ -88,11 +88,15 @@ def show_f(repo,name,token):
88
  zipObj.write(f'{name}/{file}')
89
  file_list.append(f'{name}.zip')
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}',files_metadata=True),
95
- api.get_space_runtime(f'{repo}/{name}'))
96
 
97
  def show_f2(repo,name,token):
98
  api = HfApi(token=token)
 
88
  zipObj.write(f'{name}/{file}')
89
  file_list.append(f'{name}.zip')
90
 
91
+ runtime_json=api.get_space_runtime(f'{repo}/{name}')
92
+ with open(f'{uid}-tmp.json','w') as f:
93
+ json.dump(runtime_json,f,indent=4)
94
+ f.close()
95
  return(gr.Dropdown.update(label="Files", choices=[f for f in f_ist],interactive=True),
96
  file_list,
97
  gr.update(choices=[f for f in f_ist],interactive=True),
98
  api.space_info(f'{repo}/{name}',files_metadata=True),
99
+ f'{uid}-tmp.json')
100
 
101
  def show_f2(repo,name,token):
102
  api = HfApi(token=token)