mc0117 commited on
Commit
af7e6ad
·
1 Parent(s): ee1b2d0
Files changed (1) hide show
  1. app.py +7 -2
app.py CHANGED
@@ -437,8 +437,13 @@ if __name__ == "__main__":
437
  try:
438
  from huggingface_hub import HfApi
439
  api = HfApi(token=os.environ.get("HF_TOKEN"))
440
- info = api.repo_info(repo_id=_HF_REPO_ID, repo_type="dataset")
441
- print(f"Repo accessible: {info.id} (private={info.private})")
 
 
 
 
 
442
  except Exception as e:
443
  print(f"Repo access check failed: {e}")
444
  _ensure_data()
 
437
  try:
438
  from huggingface_hub import HfApi
439
  api = HfApi(token=os.environ.get("HF_TOKEN"))
440
+ for rt in ("dataset", "model", "space"):
441
+ try:
442
+ info = api.repo_info(repo_id=_HF_REPO_ID, repo_type=rt)
443
+ print(f"Repo found as repo_type='{rt}': {info.id} (private={info.private})")
444
+ break
445
+ except Exception as e:
446
+ print(f"repo_type='{rt}': {e}")
447
  except Exception as e:
448
  print(f"Repo access check failed: {e}")
449
  _ensure_data()