You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
13 lines
284 B
13 lines
284 B
8 months ago
|
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)
|