File size: 1,014 Bytes
79cd3f4
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
26
27
28
29
30
31
32
33
34
35
#!/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()