Skip to content

Commit

Permalink
Optimize kui usage (#67)
Browse files Browse the repository at this point in the history
  • Loading branch information
abersheeran authored Jan 22, 2024
1 parent aa8fbe8 commit 0847f68
Showing 1 changed file with 2 additions and 9 deletions.
11 changes: 2 additions & 9 deletions tools/api_server.py
Original file line number Diff line number Diff line change
Expand Up @@ -448,15 +448,8 @@ def api_invoke_model(
HTTPException: http_execption_handler,
Exception: other_exception_handler,
},
)
app.router = Router(
[],
http_middlewares=[
app.exception_middleware,
allow_cors(),
],
cors_config={},
)

# Swagger UI & routes
app.router << ("/v1" // routes)
app.router << ("/docs" // OpenAPI().routes)
app.router << ("/v1" // routes) << ("/docs" // OpenAPI().routes)

0 comments on commit 0847f68

Please sign in to comment.