Spaces:
Running
Running
| """ | |
| Hugging Face Spaces - Flask Application Entry Point | |
| HF Spaces expects app.py with an 'app' variable | |
| """ | |
| import os | |
| import sys | |
| from pathlib import Path | |
| # Add project root to path | |
| BASE_DIR = Path(__file__).resolve().parent | |
| sys.path.insert(0, str(BASE_DIR)) | |
| # Import Flask app from app package | |
| # This will trigger model loading at startup | |
| from app import app | |
| # HF Spaces requires 'app' variable to be available | |
| # The app is already created in app/__init__.py | |
| # No need to run it here - Gunicorn will handle it | |