- Python 3.8 or higher
- Docker (optional)
- Intel AVX2 compatible CPU (for TensorFlow)
-
Install dependencies
pip install -r requirements.txt
It is recommended to use a virtual environment.
-
Copy .env.example to .env
cp .env.example .env
-
Start FastAPI process
python ./app/main.py
Or you can use uvicorn
uvicorn app.main:app --port 8000 --reload
Use
--reloadflag to enable auto-reload on code changes -
Open local API docs http://localhost:8000/docs
- Build Docker image
docker compose build
- Run Docker container
docker compose up -d
Use
-dflag to run in detached mode
Please refer to the ngaeninurul/model-cnn-ta repository to view the source code of the models used.