#!/usr/bin/env python3 """ ArteFact Upload Progress Checker Checks upload progress once and exits """ from huggingface_hub import HfApi # Configuration REPO_ID = 'samwaugh/artefact-markdown' REPO_TYPE = 'dataset' TOTAL_FILES = 239996 def main(): """Check progress once and exit""" try: api = HfApi() files = api.list_repo_files(repo_id=REPO_ID, repo_type=REPO_TYPE) uploaded_count = len(files) progress_percentage = (uploaded_count / TOTAL_FILES) * 100 print(f"📊 Upload Progress - {time.strftime('%Y-%m-%d %H:%M:%S')}") print(f"Files uploaded: {uploaded_count:,}/{TOTAL_FILES:,}") print(f"Progress: {progress_percentage:.1f}%") print(f"Remaining: {TOTAL_FILES - uploaded_count:,} files") if uploaded_count >= TOTAL_FILES: print("🎉 Upload complete!") except Exception as e: print(f"❌ Error checking progress: {e}") if __name__ == '__main__': import time main()