Spaces:
Sleeping
Sleeping
Download run_simple_app.py from KrishDev15/Sign_intrepreter: direct link, hf CLI and curl.
- Browser
- Download file 1.91 kB
-
https://huggingface.co/spaces/KrishDev15/Sign_intrepreter/resolve/main/run_simple_app.py
- Command line
-
hf download hf://spaces/KrishDev15/Sign_intrepreter/run_simple_app.py
-
curl -L -o run_simple_app.py https://huggingface.co/spaces/KrishDev15/Sign_intrepreter/resolve/main/run_simple_app.py
1.91 kB
| #!/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() | |