CoolFace
Apppublic

Abs6187/ISL_Sign_Language_Translation

sourceHugging Facemitupdated 1y agoView on Hugging Face
0likes
verify_deployment.py140 linesDownload Raw Back to root
1#!/usr/bin/env python3
2"""
3TechMatrix Solvers ISL Translation System
4Deployment Verification Script
5
6This script verifies that all required files are present for deployment
7"""
8
9import os
10import sys
11
12def verify_files():
13    """Verify all required files are present"""
14    required_files = [
15        'README.md',
16        'requirements.txt', 
17        'packages.txt',
18        'app.py',
19        'pose_models.py',
20        'pose_utils.py',
21        'isl_processor.py',
22        'expression_mapping.py',
23        'LICENSE',
24        '.gitignore',
25        'categories_processed.png',
26        'DataPipeline.png',
27        'model-graph.png'
28    ]
29    
30    required_dirs = [
31        'eda'
32    ]
33    
34    missing_files = []
35    missing_dirs = []
36    
37    print("๐Ÿ” TechMatrix Solvers ISL Translation System")
38    print("๐Ÿ“‹ Deployment Verification")
39    print("=" * 50)
40    
41    # Check files
42    print("\n๐Ÿ“„ Checking required files:")
43    for file in required_files:
44        if os.path.exists(file):
45            print(f"โœ… {file}")
46        else:
47            print(f"โŒ {file}")
48            missing_files.append(file)
49    
50    # Check directories
51    print("\n๐Ÿ“ Checking required directories:")
52    for dir in required_dirs:
53        if os.path.isdir(dir):
54            print(f"โœ… {dir}/")
55        else:
56            print(f"โŒ {dir}/")
57            missing_dirs.append(dir)
58    
59    # Check README content for team branding
60    print("\n๐Ÿท๏ธ Checking TechMatrix Solvers branding:")
61    if os.path.exists('README.md'):
62        with open('README.md', 'r') as f:
63            readme_content = f.read()
64            if 'TechMatrix Solvers' in readme_content:
65                print("โœ… Team branding present in README")
66            else:
67                print("โŒ Team branding missing in README")
68                
69            if 'Abhay Gupta' in readme_content:
70                print("โœ… Team member info present")
71            else:
72                print("โŒ Team member info missing")
73    
74    # Check app.py for proper imports
75    print("\n๐Ÿ”ง Checking main application structure:")
76    if os.path.exists('app.py'):
77        with open('app.py', 'r') as f:
78            app_content = f.read()
79            if 'streamlit' in app_content:
80                print("โœ… Streamlit framework detected")
81            if 'TechMatrix Solvers' in app_content:
82                print("โœ… Team branding in application")
83            if 'pose_models' in app_content and 'pose_utils' in app_content:
84                print("โœ… Core modules imported")
85    
86    print("\n" + "=" * 50)
87    
88    if missing_files or missing_dirs:
89        print("โŒ Deployment verification FAILED")
90        if missing_files:
91            print(f"Missing files: {', '.join(missing_files)}")
92        if missing_dirs:
93            print(f"Missing directories: {', '.join(missing_dirs)}")
94        return False
95    else:
96        print("โœ… Deployment verification PASSED")
97        print("๐Ÿš€ Project is ready for deployment!")
98        print("\n๐Ÿ“‹ Deployment Instructions:")
99        print("1. Upload project to HuggingFace Spaces")
100        print("2. Select Streamlit SDK")
101        print("3. Set app_file: app.py")
102        print("4. The system will automatically install dependencies")
103        print("\n๐Ÿ‘ฅ TechMatrix Solvers Team:")
104        print("- Abhay Gupta (Team Lead)")
105        print("- Kripanshu Gupta (Backend Developer)")  
106        print("- Dipanshu Patel (UI/UX Designer)")
107        print("- Bhumika Patel (Deployment & Female Presenter)")
108        print("\n๐Ÿซ Shri Ram Group of Institutions")
109        return True
110
111def check_requirements():
112    """Check requirements.txt format"""
113    print("\n๐Ÿ“ฆ Checking dependencies:")
114    try:
115        with open('requirements.txt', 'r') as f:
116            requirements = f.read().strip().split('\n')
117            print(f"โœ… Found {len(requirements)} dependencies")
118            
119            # Check for key dependencies
120            key_deps = ['streamlit', 'torch', 'keras', 'opencv-python', 'numpy']
121            for dep in key_deps:
122                if any(dep in req for req in requirements):
123                    print(f"โœ… {dep} dependency found")
124                else:
125                    print(f"โš ๏ธ  {dep} dependency not explicitly found")
126                    
127    except Exception as e:
128        print(f"โŒ Error reading requirements.txt: {e}")
129
130if __name__ == "__main__":
131    print("TechMatrix Solvers ISL Translation System")
132    print("Deployment Verification Tool\n")
133    
134    success = verify_files()
135    check_requirements()
136    
137    if success:
138        sys.exit(0)
139    else:
140        sys.exit(1)