Skip to content

Latest commit

 

History

History
46 lines (33 loc) · 1.04 KB

README.md

File metadata and controls

46 lines (33 loc) · 1.04 KB

Text Processing API

Run Web API

Local

$ sh run.sh
$ poetry run uvicorn app.main:app --reload --host 0.0.0.0 --port 9000

Docker

$ docker build -f Dockerfile -t fastapi-ml .
$ docker run -p 9000:9000 --rm --name fastapi-ml -t -i fastapi-ml

Docker Compose

$ docker compose up --build

Request Commands

$ curl --request POST --url http:https://127.0.0.1:9000/api/v1/predict --header 'Content-Type: application/json' --data '{"input_text": "test"}'
$ http POST http:https://127.0.0.1:9000/api/v1/predict input_text=тест

Development

Run Tests and Linter

$ poetry run tox

Reference