This project is built with FastAPI and the model is trained with TensorFlow, It is a straight-forward project to leverage the FastAPI power and demonstrate it.
- Cross-platform
- Fast predictions
- No singup/login required
prediction_endpoint.py
contains an efficient FastAPI prediction endpoint, it loads the pretrained model and defines the Model class for better usability and readability, it also contains the API logic and exposes a prediction endpoint.
Clone this repo to your desktop or a specific folder you want to run the project on, run pip install -r requirements.txt
to install all the dependencies.
You might want to create a virtual environment before installing the dependencies.
To run the project on your localhost, you can use uvicorn prediction_endpoint:app
and it will launch on your localhost.