uvpatel7271 commited on
Commit
7605afb
·
verified ·
1 Parent(s): c1b10f3

Upload folder using huggingface_hub

Browse files
Files changed (1) hide show
  1. 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)