File size: 588 Bytes
623e14e |
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 python3
"""
Enhanced DOCX to PDF Converter - Application Entry Point
"""
import os
import sys
from pathlib import Path
# Add src directory to Python path
sys.path.insert(0, str(Path(__file__).parent.parent.parent))
from src.api.main import app
if __name__ == "__main__":
import uvicorn
# Get port from environment variable or default to 7860 for Hugging Face compatibility
port = int(os.environ.get("PORT", 7860))
uvicorn.run(
"src.api.main:app",
host="0.0.0.0",
port=port,
reload=False,
workers=4
) |