Team Ai
Apppublic

alphanet06/processor2

sourceHugging Faceupdated 11mo agoView on Hugging Face
0likes
check_upload_status.py85 linesDownload Raw Back to root
1#!/usr/bin/env python3
2"""
3Check which files are ready for HuggingFace upload
4"""
5
6import os
7from pathlib import Path
8
9def check_upload_status():
10    """Check status of files needed for HuggingFace upload"""
11    print("=" * 60)
12    print("๐Ÿ“ค HuggingFace Upload Status Check")
13    print("=" * 60)
14    print()
15
16    required_files = {
17        '๐Ÿ” Authentication Files (CRITICAL)': {
18            'credentials.json': '1.5 KB - Generated locally via authenticate_gdrive.py',
19            'settings.yaml': '0.4 KB - PyDrive2 configuration',
20            'client_secrets.json': '0.4 KB - OAuth credentials'
21        },
22        '๐Ÿš€ Application Files (REQUIRED)': {
23            'app.py': '28.5 KB - Main app with Google Drive + Real-Debrid integration',
24            'requirements.txt': '0.1 KB - Python dependencies',
25            'Dockerfile': '2.3 KB - Container configuration'
26        },
27        '๐Ÿ“š Documentation (OPTIONAL)': {
28            'README.md': '3.4 KB - Updated documentation',
29            'DEPLOYMENT_GUIDE.md': '3.5 KB - This deployment guide',
30            'CHANGES.md': '4.2 KB - Change log',
31            'QUICK_FIX.md': '2.5 KB - Troubleshooting guide'
32        }
33    }
34
35    print("๐Ÿ“ Current directory:", os.getcwd())
36    print()
37
38    all_good = True
39
40    for category, files in required_files.items():
41        print(f"{category}:")
42        print("-" * 40)
43
44        for filename, description in files.items():
45            file_path = Path(filename)
46
47            if file_path.exists():
48                size = file_path.stat().st_size
49                size_kb = size / 1024
50                print(f"   โœ… {filename} ({size_kb:.1f} KB) - {description}")
51            else:
52                print(f"   โŒ {filename} - {description}")
53                print(f"      File not found at: {file_path.absolute()}")
54                all_good = False
55
56        print()
57
58    print("=" * 60)
59    if all_good:
60        print("๐ŸŽ‰ ALL FILES READY FOR UPLOAD!")
61        print("=" * 60)
62        print()
63        print("๐Ÿ“ค Upload these files to HuggingFace:")
64        print("   1. Go to your HuggingFace space")
65        print("   2. Click 'Files' tab")
66        print("   3. Upload ALL files listed above")
67        print("   4. Ensure they're in the root directory (same level as app.py)")
68        print()
69        print("๐Ÿ” After upload, verify at: https://your-space.hf.space/check_gdrive")
70    else:
71        print("๐Ÿ’ฅ SOME FILES MISSING!")
72        print("=" * 60)
73        print()
74        print("โŒ Please ensure all required files exist before uploading")
75        print()
76        print("๐Ÿ”ง Missing credentials.json? Run: python authenticate_gdrive.py")
77        print("๐Ÿ”ง Missing settings.yaml? Check if it exists in current directory")
78        print("๐Ÿ”ง Missing client_secrets.json? Check if it exists in current directory")
79
80    return all_good
81
82if __name__ == "__main__":
83    check_upload_status()
84
85