Spaces:
Sleeping
Sleeping
| # main.py — single ASGI app (stable Shiny mount) | |
| from fastapi import FastAPI | |
| from shiny.asgi import ShinyApp | |
| import shiny.express as sx # import the package, not the submodule | |
| from Deployment_UI import router as deployment_ui_router | |
| from Deployment_UI_BE import router as deployment_be_router | |
| app = FastAPI() | |
| app.include_router(deployment_ui_router) # serves /Deployment_UI | |
| app.include_router(deployment_be_router) # serves /api/... | |
| # Mount Shiny Express at / | |
| # Wrap the Shiny app with the ASGI adapter (prevents “module not callable” | |
| # and avoids the submodule import that led to the hex/int ‘path’ error) | |
| app.mount("/", ShinyApp(sx.app)) | |