File size: 334 Bytes
9d59179 |
1 2 3 4 5 6 7 8 9 10 11 12 13 |
import os
import uvicorn
from app import app
if __name__ == "__main__":
# Check if running on Hugging Face Spaces
IS_HF_SPACE = os.environ.get('SPACE_ID') is not None
port = 7860 if IS_HF_SPACE else 8000
print(f"Starting SHL Test Recommender API on port {port}")
uvicorn.run(app, host="0.0.0.0", port=port)
|