wannaphong commited on
Commit
b090190
·
1 Parent(s): dbaf7c6

Update index

Browse files
Files changed (1) hide show
  1. app.py +3 -2
app.py CHANGED
@@ -1,7 +1,7 @@
1
  from fastapi import Depends, FastAPI, Header, HTTPException
2
  from fastapi.middleware.cors import CORSMiddleware
 
3
  from routers import tokenize
4
- import pythainlp
5
 
6
 
7
  DESC_TEXT = "PyThaiNLP API"
@@ -23,6 +23,7 @@ app.add_middleware(
23
 
24
  @app.get("/")
25
  def index():
26
- return {"Pythainlp Version": pythainlp.__version__}
 
27
 
28
  app.include_router(tokenize.router, prefix="/tokenize", tags=["Tokenize"])
 
1
  from fastapi import Depends, FastAPI, Header, HTTPException
2
  from fastapi.middleware.cors import CORSMiddleware
3
+ from fastapi.responses import RedirectResponse
4
  from routers import tokenize
 
5
 
6
 
7
  DESC_TEXT = "PyThaiNLP API"
 
23
 
24
  @app.get("/")
25
  def index():
26
+ response = RedirectResponse(url='/docs')
27
+ return response
28
 
29
  app.include_router(tokenize.router, prefix="/tokenize", tags=["Tokenize"])