Omnibus commited on
Commit
8906a0b
1 Parent(s): 95bece5

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +10 -5
app.py CHANGED
@@ -251,11 +251,16 @@ def get_space_runtime(author,token):
251
  api = HfApi(token=token)
252
  s_list = (api.list_spaces(author=author))
253
  for i,space in enumerate(s_list):
254
- print (f'SPACE :: {space}')
255
- #space_ea = space.id.split("/",1)[1]
256
- outr=api.get_space_runtime(f'{space.id}')
257
- print(f'OUTR :: {outr}')
258
- space_info.append(outr.stage)
 
 
 
 
 
259
 
260
  print(space_info)
261
  #return space_info
 
251
  api = HfApi(token=token)
252
  s_list = (api.list_spaces(author=author))
253
  for i,space in enumerate(s_list):
254
+ try:
255
+ print (f'SPACE :: {space}')
256
+ #space_ea = space.id.split("/",1)[1]
257
+ outr=api.get_space_runtime(f'{space.id}')
258
+ print(f'OUTR :: {outr}')
259
+ print (f'STAGE :: {outr.stage}')
260
+ space_info.append(outr.stage)
261
+ except Exception as e:
262
+ print (e)
263
+ pass
264
 
265
  print(space_info)
266
  #return space_info