A Cookiecutter template for exposing AI models with FastAPI.
-
cd into the parent directory and run the following
cookiecutter https://github.com/phacic/ai_api_template
It will create the app structure neccessary for exposing model through REST API
-
cd into the newly create directory and run
poetry install
-
run the app with
poetry shell python -m main
The app should be accessible on localhost:8000
You might want the check the pyproject.toml and Dockerfile if you need other packages or customize the docker container.
Running test with pytest .
in the resulting app throws an error ModuleNotFoundError: No module named 'requests'