File size: 840 Bytes
795183d |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 |
from huggingface_hub import HfApi
import os
def check_space_status():
api = HfApi(token=os.getenv('HF_TOKEN'))
try:
# Check if space exists
repo_info = api.repo_info('Cosmo125/Singtel_Bill_Scanner', repo_type='space')
print(f'β
Space exists: {repo_info.id}')
print(f'π
Last modified: {repo_info.last_modified}')
# List files in the space
files = api.list_repo_files('Cosmo125/Singtel_Bill_Scanner', repo_type='space')
print(f'π Files in space ({len(files)} total):')
for file in files[:10]: # Show first 10 files
print(f' - {file}')
return True
except Exception as e:
print(f'β Error checking space: {e}')
return False
if __name__ == "__main__":
check_space_status()
|