Spaces:
Sleeping
Sleeping
File size: 568 Bytes
5fcd861 cb8994c 5fcd861 cb8994c | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 | """
server/app.py – Entry point for multi-mode deployment.
Re-exports the FastAPI app from the parent package so the server can be
started from either the repo root or the server/ subdirectory.
"""
import os
import sys
# Allow imports from the repo root regardless of working directory
sys.path.insert(0, os.path.join(os.path.dirname(__file__), ".."))
from app import app # noqa: F401 — re-export for uvicorn
def main():
import uvicorn
uvicorn.run("server.app:app", host="0.0.0.0", port=7860, reload=False)
if __name__ == "__main__":
main()
|