Spaces:
Runtime error
Runtime error
Redirect root URL to /docs for judge-friendly landing
Browse files
openenv_wrapper/server/app.py
CHANGED
|
@@ -6,6 +6,7 @@ import os
|
|
| 6 |
sys.path.insert(0, os.path.join(os.path.dirname(__file__), "..", ".."))
|
| 7 |
|
| 8 |
from openenv.core.env_server import create_app
|
|
|
|
| 9 |
|
| 10 |
from openenv_wrapper.models import VarahaAction, VarahaObservation
|
| 11 |
from openenv_wrapper.varaha_environment import VarahaEnvironment
|
|
@@ -19,10 +20,6 @@ app = create_app(
|
|
| 19 |
|
| 20 |
|
| 21 |
@app.get("/")
|
| 22 |
-
def root() ->
|
| 23 |
-
|
| 24 |
-
|
| 25 |
-
"status": "ok",
|
| 26 |
-
"docs": "/docs",
|
| 27 |
-
"health": "/health",
|
| 28 |
-
}
|
|
|
|
| 6 |
sys.path.insert(0, os.path.join(os.path.dirname(__file__), "..", ".."))
|
| 7 |
|
| 8 |
from openenv.core.env_server import create_app
|
| 9 |
+
from fastapi.responses import RedirectResponse
|
| 10 |
|
| 11 |
from openenv_wrapper.models import VarahaAction, VarahaObservation
|
| 12 |
from openenv_wrapper.varaha_environment import VarahaEnvironment
|
|
|
|
| 20 |
|
| 21 |
|
| 22 |
@app.get("/")
|
| 23 |
+
def root() -> RedirectResponse:
|
| 24 |
+
# Make the default Space URL immediately useful for judges.
|
| 25 |
+
return RedirectResponse(url="/docs", status_code=307)
|
|
|
|
|
|
|
|
|
|
|
|