Spaces:
Sleeping
Sleeping
Upload folder using huggingface_hub
Browse files- server/app.py +11 -4
server/app.py
CHANGED
|
@@ -45,10 +45,17 @@ app = create_app(
|
|
| 45 |
router = APIRouter(tags=["python-code-review"])
|
| 46 |
|
| 47 |
|
| 48 |
-
@router.get("/", include_in_schema=False)
|
| 49 |
-
def root() -> RedirectResponse:
|
| 50 |
-
"""Redirect root to API documentation."""
|
| 51 |
-
return RedirectResponse(url="/docs")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 52 |
|
| 53 |
|
| 54 |
@router.get("/health", response_model=HealthResponse)
|
|
|
|
| 45 |
router = APIRouter(tags=["python-code-review"])
|
| 46 |
|
| 47 |
|
| 48 |
+
@router.get("/", include_in_schema=False)
|
| 49 |
+
def root() -> RedirectResponse:
|
| 50 |
+
"""Redirect root to API documentation."""
|
| 51 |
+
return RedirectResponse(url="/docs")
|
| 52 |
+
|
| 53 |
+
|
| 54 |
+
@router.get("/web", include_in_schema=False)
|
| 55 |
+
@router.get("/web/", include_in_schema=False)
|
| 56 |
+
def root_web() -> RedirectResponse:
|
| 57 |
+
"""Redirect Hugging Face Spaces base-path requests to API documentation."""
|
| 58 |
+
return RedirectResponse(url="/docs")
|
| 59 |
|
| 60 |
|
| 61 |
@router.get("/health", response_model=HealthResponse)
|