File size: 714 Bytes
25f22bf |
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 |
#!/usr/bin/env python
"""
Entry point for the Lin application.
This is an alternative entry point that can be used if needed.
"""
import os
import sys
if __name__ == "__main__":
# Set the port for Hugging Face Spaces
port = os.environ.get('PORT', '7860')
os.environ.setdefault('PORT', port)
print(f"Starting Lin application on port {port}...")
try:
# Import and run the backend Flask app directly
from backend.app import create_app
app = create_app()
app.run(
host='0.0.0.0',
port=int(port),
debug=False
)
except Exception as e:
print(f"Failed to start Lin application: {e}")
sys.exit(1) |