Spaces:
Runtime error
Runtime error
| #!/usr/bin/env python3 | |
| """ | |
| Simple launcher for Hugging Face Spaces deployment. | |
| This script ensures the app runs properly in the HF Spaces environment. | |
| """ | |
| import os | |
| import sys | |
| # Add current directory to Python path | |
| sys.path.insert(0, os.path.dirname(os.path.abspath(__file__))) | |
| # Import and run the main app | |
| from app import interface | |
| if __name__ == "__main__": | |
| # Launch with settings optimized for HF Spaces | |
| interface.launch( | |
| server_name="0.0.0.0", # Allow external connections | |
| server_port=7860, # Default HF Spaces port | |
| share=False, # Don't create shareable link (HF handles this) | |
| show_error=True, # Show errors for debugging | |
| quiet=False, # Show startup messages | |
| inbrowser=False # Don't open browser (HF handles this) | |
| ) |