hynky HF staff commited on
Commit
6ecb679
·
1 Parent(s): 238bb80

repo structure fallback

Browse files
Files changed (1) hide show
  1. app.py +5 -1
app.py CHANGED
@@ -54,7 +54,11 @@ def fetch_repo_structure(results_uri, split_checkpoints=False, oauth_token: gr.O
54
  token = oauth_token.token
55
 
56
  data_folder = DataFolder(results_uri, token=token)
57
- runs = [f.removeprefix("details/") for f in data_folder.list_files("details", recursive=False, include_directories=True) if f != "details"]
 
 
 
 
58
 
59
  if not runs:
60
  return {}, gr.update(choices=[], value=None)
 
54
  token = oauth_token.token
55
 
56
  data_folder = DataFolder(results_uri, token=token)
57
+ try:
58
+ runs = [f.removeprefix("details/") for f in data_folder.list_files("details", recursive=False, include_directories=True) if f != "details"]
59
+ except Exception as e:
60
+ print(f"Error fetching repo structure: {e}")
61
+ runs = []
62
 
63
  if not runs:
64
  return {}, gr.update(choices=[], value=None)