File size: 4,746 Bytes
e2cffd9 |
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 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 |
#!/usr/bin/env python3
"""
TechMatrix Solvers ISL Translation System
Deployment Verification Script
This script verifies that all required files are present for deployment
"""
import os
import sys
def verify_files():
"""Verify all required files are present"""
required_files = [
'README.md',
'requirements.txt',
'packages.txt',
'app.py',
'pose_models.py',
'pose_utils.py',
'isl_processor.py',
'expression_mapping.py',
'LICENSE',
'.gitignore',
'categories_processed.png',
'DataPipeline.png',
'model-graph.png'
]
required_dirs = [
'eda'
]
missing_files = []
missing_dirs = []
print("π TechMatrix Solvers ISL Translation System")
print("π Deployment Verification")
print("=" * 50)
# Check files
print("\nπ Checking required files:")
for file in required_files:
if os.path.exists(file):
print(f"β
{file}")
else:
print(f"β {file}")
missing_files.append(file)
# Check directories
print("\nπ Checking required directories:")
for dir in required_dirs:
if os.path.isdir(dir):
print(f"β
{dir}/")
else:
print(f"β {dir}/")
missing_dirs.append(dir)
# Check README content for team branding
print("\nπ·οΈ Checking TechMatrix Solvers branding:")
if os.path.exists('README.md'):
with open('README.md', 'r') as f:
readme_content = f.read()
if 'TechMatrix Solvers' in readme_content:
print("β
Team branding present in README")
else:
print("β Team branding missing in README")
if 'Abhay Gupta' in readme_content:
print("β
Team member info present")
else:
print("β Team member info missing")
# Check app.py for proper imports
print("\nπ§ Checking main application structure:")
if os.path.exists('app.py'):
with open('app.py', 'r') as f:
app_content = f.read()
if 'streamlit' in app_content:
print("β
Streamlit framework detected")
if 'TechMatrix Solvers' in app_content:
print("β
Team branding in application")
if 'pose_models' in app_content and 'pose_utils' in app_content:
print("β
Core modules imported")
print("\n" + "=" * 50)
if missing_files or missing_dirs:
print("β Deployment verification FAILED")
if missing_files:
print(f"Missing files: {', '.join(missing_files)}")
if missing_dirs:
print(f"Missing directories: {', '.join(missing_dirs)}")
return False
else:
print("β
Deployment verification PASSED")
print("π Project is ready for deployment!")
print("\nπ Deployment Instructions:")
print("1. Upload project to HuggingFace Spaces")
print("2. Select Streamlit SDK")
print("3. Set app_file: app.py")
print("4. The system will automatically install dependencies")
print("\nπ₯ TechMatrix Solvers Team:")
print("- Abhay Gupta (Team Lead)")
print("- Kripanshu Gupta (Backend Developer)")
print("- Dipanshu Patel (UI/UX Designer)")
print("- Bhumika Patel (Deployment & Female Presenter)")
print("\nπ« Shri Ram Group of Institutions")
return True
def check_requirements():
"""Check requirements.txt format"""
print("\nπ¦ Checking dependencies:")
try:
with open('requirements.txt', 'r') as f:
requirements = f.read().strip().split('\n')
print(f"β
Found {len(requirements)} dependencies")
# Check for key dependencies
key_deps = ['streamlit', 'torch', 'keras', 'opencv-python', 'numpy']
for dep in key_deps:
if any(dep in req for req in requirements):
print(f"β
{dep} dependency found")
else:
print(f"β οΈ {dep} dependency not explicitly found")
except Exception as e:
print(f"β Error reading requirements.txt: {e}")
if __name__ == "__main__":
print("TechMatrix Solvers ISL Translation System")
print("Deployment Verification Tool\n")
success = verify_files()
check_requirements()
if success:
sys.exit(0)
else:
sys.exit(1) |