Skip to content

Commit 67fcbbc

Browse files
committed
Update dockerfile and add pythainlp version
1 parent 9a5287b commit 67fcbbc

File tree

5 files changed

+6
-2
lines changed

5 files changed

+6
-2
lines changed

Dockerfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ WORKDIR /usr/src/app
44
EXPOSE 8000
55

66
COPY requirements.txt ./
7+
RUN apt-get install python3-dev
78
RUN pip install -r requirements.txt
89

910
COPY . .

app.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,14 @@
11
# -*- coding: utf-8 -*-
22
from fastapi import Depends, FastAPI, Header, HTTPException
33
from routers import tag, tokenize
4+
from pythainlp import __version__
45

56
app = FastAPI()
67

78

89
@app.get("/")
910
def hello():
10-
return {"Hello": "World"}
11+
return {"pythainlp": __version__}
1112

1213

1314
app.include_router(tag.router)

requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
fastapi
2-
pythainlp
2+
pythainlp==2.1.4
33
uvicorn
44
pytest

routers/tag.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
# -*- coding: utf-8 -*-
12
from fastapi import APIRouter
23
from pythainlp import tag
34

routers/tokenize.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
# -*- coding: utf-8 -*-
12
from fastapi import APIRouter
23
from pythainlp import tokenize
34

0 commit comments

Comments
 (0)