Spaces:
Build error
Build error
| #!/usr/bin/env python3 | |
| # app.py - Entry point for Hugging Face Spaces | |
| from main import app, APP_DIR, setup_static_routes, IMG_DIR, SIM_MAP_DIR | |
| import os | |
| # Ensure directories exist | |
| os.makedirs(APP_DIR, exist_ok=True) | |
| os.makedirs(IMG_DIR, exist_ok=True) | |
| os.makedirs(SIM_MAP_DIR, exist_ok=True) | |
| # Set up static routes | |
| setup_static_routes(app) | |
| # For Hugging Face Spaces | |
| if __name__ == "__main__": | |
| import uvicorn | |
| uvicorn.run(app, host="0.0.0.0", port=7860) |