Spaces:
Sleeping
Sleeping
File size: 556 Bytes
76a84aa | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 | """
Server entry point for OpenEnv.
Hosts the negotiation environment as a FastAPI server.
"""
import sys
import os
# Add parent directory to path so we can import from root
sys.path.insert(0, os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
from app import app # noqa: E402
__all__ = ["app"]
def main():
"""Run the server with uvicorn."""
import uvicorn
port = int(os.environ.get("PORT", "7860"))
host = os.environ.get("HOST", "0.0.0.0")
uvicorn.run(app, host=host, port=port)
if __name__ == "__main__":
main()
|