from fastapi import FastAPI
from cppy.cp_util import *
import uvicorn

app = FastAPI()

@app.post("/tokenize")
async def tokenize(text: str):
    words = extract_str_words(text)
    return {"words": words}

if __name__ == "__main__":
    uvicorn.run(app, host="127.0.0.1", port= 7770)