Spaces:
Sleeping
Sleeping
File size: 1,911 Bytes
1f4e4ae | 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 | #!/usr/bin/env python3
"""
Simple startup script for the streamlined Sign Language Interpreter
"""
import subprocess
import sys
import os
import time
def check_requirements():
"""Check if required files exist"""
required_files = ['simple_sign_interpreter.py', 'sign_utils.py', 'models/model.tflite', 'models/labels.txt']
missing_files = [f for f in required_files if not os.path.exists(f)]
if missing_files:
print("β Missing required files:")
for file in missing_files:
print(f" - {file}")
print("\nPlease ensure all required files are present.")
return False
print("β
All required files found.")
return True
def start_streamlit():
"""Start the simple sign interpreter app"""
print("π€ Starting Simple Sign Language Interpreter...")
print("=" * 50)
if not check_requirements():
return
try:
print("π Starting Streamlit app on http://localhost:8501")
print("π Instructions:")
print(" 1. Allow camera access when prompted")
print(" 2. Make sign language gestures for numbers (1,2,4,5,6,7,8) or letters (A-X)")
print(" 3. Hold gestures steady for best recognition")
print(" 4. Adjust confidence threshold if needed")
print()
print("Press Ctrl+C to stop the application")
print("=" * 50)
# Start Streamlit
subprocess.run([
sys.executable, '-m', 'streamlit', 'run', 'simple_sign_interpreter.py',
'--server.port=8501',
'--server.headless=false'
])
except KeyboardInterrupt:
print("\nπ Application stopped.")
print("π Thank you for using the Sign Language Interpreter!")
except Exception as e:
print(f"β Error starting application: {e}")
if __name__ == "__main__":
start_streamlit()
|