Spaces:
Sleeping
Sleeping
| """ | |
| Hugging Face Spaces entry point for FastAPI app. | |
| This file is required for Hugging Face Spaces deployment. | |
| """ | |
| import os | |
| import sys | |
| # Add the app directory to the path | |
| sys.path.insert(0, os.path.dirname(os.path.abspath(__file__))) | |
| # Import the FastAPI app from app.main | |
| from app.main import app | |
| # The app will be served by Hugging Face Spaces automatically | |
| if __name__ == "__main__": | |
| import uvicorn | |
| port = int(os.environ.get("PORT", 7860)) | |
| uvicorn.run(app, host="0.0.0.0", port=port) | |