Spaces:
Sleeping
Sleeping
| """Adapter module so Uvicorn can import the ASGI app as `API.main:app`. | |
| This simply re-exports the `app` defined in the project's top-level `main.py`. | |
| """ | |
| try: | |
| from main import app # project root `main.py` | |
| except Exception: | |
| # Fallback: add project root to path then import | |
| import os | |
| import sys | |
| sys.path.append(os.path.dirname(os.path.dirname(__file__))) | |
| from main import app | |
| __all__ = ["app"] | |